From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluetooth driver, which is supplied for an internal > or external BT chip, Windows offers sometimes two com ports for a > serial BT device, one for incoming connections (initiated by the BT > device) and one for outgoing connections (initiated by the PC). > > When we try to connect rxtx to the "outgoing" port, rxtx can't connect. > > When we try to connect rxtx to the "incoming" port, rxtx can connect, > but no data exchange seems to happen (which is logical in a way, > because the simple BT device would never initiate the connection by > itself, I assume) > > > Is this a known problem and is there any workaround or solution > available to make rxtx work with such a device & driver combination? > > > many thanks in advance & best regards > > Steffen K?hler > www.oobd.org > > > > > From boflor at gmail.com Sun Jan 16 13:58:19 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Sun, 16 Jan 2011 21:58:19 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D3344CD.80003@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> <4D3344CD.80003@koehlers.de> Message-ID: <4D335BEB.4080602@gmail.com> Afaik the windows BT stack is the only one with both incoming and outgoing ports for the same device (obviously i dont know all the bt stacks out there, but some experience with toshiba, widcomm and bluesoleil.) The windows bt stack is notoriously horrible, try a different one, it will safe you a lot of time and anguish. Op 16/01/2011 20:19, Steffen K?hler schreef: > Am I really the ONLY ONE having this problem??? > > Am 04.01.2011 11:52, schrieb Steffen K?hler: >> Hello RXTX- Team >> >> as I couldn't find anything in the mail achive (?), I would like to >> highlight the following problem: >> >> Depending on the bluetooth driver, which is supplied for an internal >> or external BT chip, Windows offers sometimes two com ports for a >> serial BT device, one for incoming connections (initiated by the BT >> device) and one for outgoing connections (initiated by the PC). >> >> When we try to connect rxtx to the "outgoing" port, rxtx can't connect. >> >> When we try to connect rxtx to the "incoming" port, rxtx can connect, >> but no data exchange seems to happen (which is logical in a way, >> because the simple BT device would never initiate the connection by >> itself, I assume) >> >> >> Is this a known problem and is there any workaround or solution >> available to make rxtx work with such a device & driver combination? >> >> >> many thanks in advance & best regards >> >> Steffen K?hler >> www.oobd.org >> >> >> >> >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Tue Jan 18 13:38:53 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Tue, 18 Jan 2011 21:38:53 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx In-Reply-To: References: Message-ID: <607DF173-6F9F-405A-BDE0-D04E90EEB9BB@solcon.nl> Mariusz, thanks for your answer, it pointed me in the right direction, finally I fixed the problem. the main problem was that this.in.read(buffer) as in: while ( ( len = this.in.read(buffer)) > -1 ) waits until data is available and never returns -1. But lucky me, rxtx has the function this.in.available(), which returns the amount of data available in the input. So I made something like: while (reading) { if (in.available() > 0) { in.read(b); ........... } yield(); } kindly, Gerrit. On 13 jan 2011, at 10:00, rxtx-request at qbang.org wrote: > > Message: 4 > Date: Thu, 13 Jan 2011 10:31:49 +0100 > From: "M.Dec-GM" > To: > Subject: Re: [Rxtx] RXTXPort.close() deadlock problem and development > status ofrxtx > Message-ID: > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Hi Gernt, > try this.- in manyl cases helps. > http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html > > Look for the whole thread. > We was discussed some improvements later in the thread - but generally it > works. > > Regards > Mariusz > From gerrit.polder at solcon.nl Wed Jan 19 13:37:55 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Wed, 19 Jan 2011 21:37:55 +0100 Subject: [Rxtx] clear input buffer on startup. Message-ID: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> how can I clear the input buffer on startup, when I open a comport on a serial device where lots of data were send to before the application opens, my application gets stuck on this data. So how can I easily reset the port such that only new data is handled by my application? thanks, Gerrit. From mariusz.dec at gmail.com Wed Jan 19 23:17:38 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 20 Jan 2011 07:17:38 +0100 Subject: [Rxtx] clear input buffer on startup. References: <8D88AEC5-C8F6-4711-B3E8-9836BFCF9605@solcon.nl> Message-ID: <07CF7AAE837349EF920DB9DEAE0952BB@mdam3> ----- Original Message ----- From: "Gerrit Polder" To: Sent: Wednesday, January 19, 2011 9:37 PM Subject: [Rxtx] clear input buffer on startup. > how can I clear the input buffer on startup, Before opening port you are creating a new instance of the port in Java and OS. In this "time point" java starts RXTX native part and this part of RXTX connects to device layer in OS. Next step is opening the port. If you have incoming data in this moment, it means that device layer don't cleans buffers while starting (driver's feature - programmer's mistake/error) or external device is sending data and OS is receiving it. So in fact, flushing/cleaning input buffer helps a little because you never don't know what has happened. !! I haven't never seen waste data in RXTX buffer on open(), so it looks that RXTX and my OS drivers (FTDI) are ok. !! What to do: Data in EACH transmission needs header and trailer, checksum and length of the block are very useful as well. If you are receiving data, you have to identify what data means - you have to identify block and read from this block Your incoming part of the app should look for the first header and flush data until header will be identified. Later you should wait for the trailer or read data using packet length (usually after header), finally check the cheksum (usually on the end, may be in the role of the trailer). Succesfullly checked data should be transferred to app, damaged data should be flushed. Regards Mariusz From Huiyan at cookeoptics.com Mon Jan 24 08:18:19 2011 From: Huiyan at cookeoptics.com (Huiyan at cookeoptics.com) Date: Mon, 24 Jan 2011 15:18:19 +0000 Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: Hi, My java program communicates with a device thorough USB-serial adaptor. It sends a command and the device sends back the information. The program is event based, it works fine on Windows, but not work on MAC OS X (10.6). It seems that no SerialPortEvent.DATA_AVAILABLE event was generated. I set a breakpoint at the start of the event handler, it didn't run to there. Has anyone met this problem before? Thanks. Huiyan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Jan 25 04:45:35 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 25 Jan 2011 04:45:35 -0700 (MST) Subject: [Rxtx] rxtx event based program not work on MAC In-Reply-To: References: Message-ID: On Mon, 24 Jan 2011, Huiyan at cookeoptics.com wrote: > Hi, > > My java program communicates with a device thorough USB-serial adaptor. It > sends a command and the device sends back the information. The program is > event based, ?it works fine on Windows, but not work on MAC OS X (10.6). ?It > seems that no SerialPortEvent.DATA_AVAILABLE event ?was generated. I set a > breakpoint at the start of the event handler, it didn't run to there. > > Has anyone met this problem before? > > Thanks. > > Huiyan > Hi Huiyan, I know this works with some adaptors on Mac OS X. It may be a driver issue. You may check if there is an update available for the driver from the vendor. From hansj.rupp at googlemail.com Thu Jan 27 00:54:59 2011 From: hansj.rupp at googlemail.com (Hans Rupp) Date: Thu, 27 Jan 2011 08:54:59 +0100 Subject: [Rxtx] serial port stops working Message-ID: hello group, i'm using the eventbased example code from rxtx-page to read the output of gps-mouse. in general the application works fine, but from time to time the serial port stops receiving data from the mouse and doesn't recover from this state. no exception or error is thrown. has anyone here seen similar behaviour/problems and knows its causes and a solution? greetings hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.tavares at gmail.com Thu Jan 27 11:13:32 2011 From: roberto.tavares at gmail.com (Roberto Tavares) Date: Thu, 27 Jan 2011 16:13:32 -0200 Subject: [Rxtx] Error 0x7a on rxtx for Windows Message-ID: Hello, I'm using rxtx for Windows and I got stucked on a C error. Status: - I'm running Windows 7 - There's a GPS device under COM4 sending stuff at 9600, 8, N, 1 - I can see the stuff sent by the device using a third-part terminal - I run the example from the site that list all avaliable ports, and it works fine Problem: I run an example like the one found here ( http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port). I got the following error: Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2263): The transfer data space allocated for a system call is too small Error 0x7a at /home/bob/foo/rxtx-devel/build/../src/termios.c(2269): The transfer data space allocated for a system call is too small (I translate the sentence "The transfer...", since some smart dude translate the error message to portuguese) After it, I got an gnu.io.PortInUseException Any ideas of what is happening? The problem happens here: import gnu.io.CommPort; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class SerialPortRunnables { (...) void connect ( String portName ) throws Exception { 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); //That's line 27 if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); Thanks! Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Schafer at mathworks.com Sat Jan 29 15:12:55 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Sat, 29 Jan 2011 22:12:55 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 Message-ID: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> I have an application that currently runs only on 32 bit windows and I would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of the prebuilt win64 binaries. The problem I am having is that switching my application from 2.1-7 to 2.2 causes it to stop receiving any data at all--still on windows xp 32 bit. I work with Trent and he has been very helpful, but I still have not found the problem. I retrieved the sources from cvs and built them. I now have a RXTXcomm.jar modified to print to std out all the debugging information as well as a debug version of rxtxSerial.dll. My test setup is a windows xp32 VM on a macbook talking to an embedded board via a USB serial adapter. I realize that is a lot of intervening machinery, but everything works fine with 2.1-7. Furthermore, I took my freshly built binaries and used them to replace the installed ones in my MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. By not working I mean that available always returns 0 and read never reads anything. I went through the diagnostic info printed out by rxtx and both MATLAB and my application are making all the same calls to open the serial port, configure it, and read it. I can provide more details, code, etc. if anybody thinks it will help. Does anyone have any idea what could be going on here? Thanks, Marc From tjarvi at qbang.org Mon Jan 31 04:19:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 31 Jan 2011 04:19:24 -0700 (MST) Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 In-Reply-To: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> Message-ID: On Sat, 29 Jan 2011, Marc Schafer wrote: > I have an application that currently runs only on 32 bit windows and I > would like to upgrade it from 2.1-7 to 2.2 in order to take advantage of > the prebuilt win64 binaries. The problem I am having is that switching > my application from 2.1-7 to 2.2 causes it to stop receiving any data at > all--still on windows xp 32 bit. > > I work with Trent and he has been very helpful, but I still have not > found the problem. I retrieved the sources from cvs and built them. I > now have a RXTXcomm.jar modified to print to std out all the debugging > information as well as a debug version of rxtxSerial.dll. > > My test setup is a windows xp32 VM on a macbook talking to an embedded > board via a USB serial adapter. I realize that is a lot of intervening > machinery, but everything works fine with 2.1-7. Furthermore, I took my > freshly built binaries and used them to replace the installed ones in my > MATLAB R2010b. From MATLAB, I am able to talk to my embedded board. > > By not working I mean that available always returns 0 and read never > reads anything. I went through the diagnostic info printed out by rxtx > and both MATLAB and my application are making all the same calls to open > the serial port, configure it, and read it. > > I can provide more details, code, etc. if anybody thinks it will help. > Does anyone have any idea what could be going on here? > Hi Mark, How many pins are used on the embedded serial port? I wonder if you need to assert DTR to enable communication. Sometimes people resolve flow control problems with a blob of soldier or loopback wiring :) The available() method is probably telling the truth. Thinking back, I think we did turn off DTR by default because some people had to power cycle their devices after it was asserted. -- Trent Jarvi tjarvi at qbang.org From Marc.Schafer at mathworks.com Mon Jan 31 11:30:25 2011 From: Marc.Schafer at mathworks.com (Marc Schafer) Date: Mon, 31 Jan 2011 18:30:25 +0000 Subject: [Rxtx] problem upgrading from 2.1-7 to 2.2 (solved) In-Reply-To: <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> References: <2CD57B12-D315-435E-B246-AA1E4058D3B3@mathworks.com> <94AEAC52-4B2E-4575-B22F-14F65A426BB4@provicor.com> Message-ID: Trent pointed out the problem to me. Ilkka, you were right about the flow control issue. Apparently 2.1-7 set DTR by default and 2.2 does not and this was the root cause of my problem. Thanks, Marc From jeff at jeffodell.com Mon Jan 3 18:39:00 2011 From: jeff at jeffodell.com (Jeff Odell) Date: Mon, 3 Jan 2011 17:39:00 -0800 Subject: [Rxtx] Building RXTX 2.0 branch on Mac Message-ID: I am attempting to build RXTX 2.0 from the CVS on my Mac. I checked out the latest version from CVS today and when I try to build, Xcode3 complains that project.pbxproj is missing. I compared the downloaded bits for the 2.0 and 2.1 branch and indeed project.pbxproj is missing in the 2.0 brach. The missing file is located in /rxtx-devel/MACOSX_IDE/Xcode3/RXTX.xcodeproj. Can someone check this missing file in so I can build successfully? Once the file is checked in, I am happy to confirm if the source builds correctly. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From steffen at koehlers.de Tue Jan 4 03:52:45 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Tue, 04 Jan 2011 11:52:45 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports Message-ID: <4D22FBFD.5050004@koehlers.de> Hello RXTX- Team as I couldn't find anything in the mail achive (?), I would like to highlight the following problem: Depending on the bluetooth driver, which is supplied for an internal or external BT chip, Windows offers sometimes two com ports for a serial BT device, one for incoming connections (initiated by the BT device) and one for outgoing connections (initiated by the PC). When we try to connect rxtx to the "outgoing" port, rxtx can't connect. When we try to connect rxtx to the "incoming" port, rxtx can connect, but no data exchange seems to happen (which is logical in a way, because the simple BT device would never initiate the connection by itself, I assume) Is this a known problem and is there any workaround or solution available to make rxtx work with such a device & driver combination? many thanks in advance & best regards Steffen K?hler www.oobd.org From Thomas.Damgaard at polycom.com Tue Jan 4 06:13:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Tue, 4 Jan 2011 13:13:47 +0000 Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E56E@SLOMAILPRD01.polycom.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E578@SLOMAILPRD01.polycom.com> Hi, Anyone able to help with the issue described below? Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: [Rxtx] java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CBAC19.9A3474C0] [cid:image002.jpg at 01CBAC19.9A3474C0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From boflor at gmail.com Tue Jan 11 03:13:57 2011 From: boflor at gmail.com (boflor at gmail.com) Date: Tue, 11 Jan 2011 11:13:57 +0100 Subject: [Rxtx] win7 64-bit problems Message-ID: <4D2C2D65.9020905@gmail.com> Dear list members, We are using the rxtx library in a program to connect to a Bluetooth peripheral device. We have no problem in getting things to work on WinXP. Unfortunately we are not getting consistent results in Win7 64-bit. I have tested it using the windows BT stack. The connection will work sometimes, but at other times there are errors. If connection fails for whatever reason the program will try to connect again a couple of times. Sometimes we have received "No such port exceptions". These can be followed by a succesfull connection, but also by > CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore > timeout period has expired This will crash the program. As I said: it does work sometimes and we never experience problems on a 32-bit winXP system. Is this a bug in the library? Anyone any ideas how to solve this? Regards, bf. From helmut.bergmann at streamunlimited.com Tue Jan 11 06:04:49 2011 From: helmut.bergmann at streamunlimited.com (Helmut Bergmann*) Date: Tue, 11 Jan 2011 14:04:49 +0100 Subject: [Rxtx] win7 64-bit problems In-Reply-To: <4D2C2D65.9020905@gmail.com> References: <4D2C2D65.9020905@gmail.com> Message-ID: <4D2C5571.5030801@streamunlimited.com> Hey bf, I was also getting the same crashes of the RXTX.dll with Windows 7 x64. But only with the provided DLL. I then built a new DLL from the newest rxtx developer source code and used that one. Although I'm still seeing a few termios.c errors, the dll doesn't crash the whole program. Hope this helps. Kind regards, Helmut Am 11.01.2011 11:13, schrieb boflor at gmail.com: > Dear list members, > > We are using the rxtx library in a program to connect to a Bluetooth > peripheral device. > We have no problem in getting things to work on WinXP. Unfortunately > we are not getting consistent results in Win7 64-bit. > I have tested it using the windows BT stack. > The connection will work sometimes, but at other times there are errors. > > If connection fails for whatever reason the program will try to > connect again a couple of times. > Sometimes we have received "No such port exceptions". These can be > followed by a succesfull connection, but also by >> CONNECT Error 0x79 at ..\rxtx\src\termios.c(892): The semaphore >> timeout period has expired > This will crash the program. > > As I said: it does work sometimes and we never experience problems on > a 32-bit winXP system. > Is this a bug in the library? Anyone any ideas how to solve this? > > Regards, > > bf. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From gerrit.polder at solcon.nl Thu Jan 13 02:07:16 2011 From: gerrit.polder at solcon.nl (Gerrit Polder) Date: Thu, 13 Jan 2011 10:07:16 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status of rxtx Message-ID: Hi all, I'm getting desperate while trying to fix the RXTXPort.close() deadlock problem. When I close a port RXTX hangs. This error is reported frequently, work arounds are published like here: http://02-30-am.blogspot.com/2010/05/blog-post.html and here: http://mango.serotoninsoftware.com/forum/posts/list/297.page and here: http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html but still I didn't find a solution which works for me. What strikes me is that although this is a well known and serious bug, which is also reported in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. The last stable version of rxtx is almost 5 years old now. Is there any progress in rxtx?? kindly, Gerrit. From mariusz.dec at gmail.com Thu Jan 13 02:31:49 2011 From: mariusz.dec at gmail.com (M.Dec-GM) Date: Thu, 13 Jan 2011 10:31:49 +0100 Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx References: Message-ID: Hi Gernt, try this.- in manyl cases helps. http://mailman.qbang.org/pipermail/rxtx/2010-September/7821768.html Look for the whole thread. We was discussed some improvements later in the thread - but generally it works. Regards Mariusz ----- Original Message ----- From: "Gerrit Polder" To: Sent: Thursday, January 13, 2011 10:07 AM Subject: [Rxtx] RXTXPort.close() deadlock problem and development status ofrxtx > Hi all, > > I'm getting desperate while trying to fix the RXTXPort.close() deadlock > problem. > When I close a port RXTX hangs. > This error is reported frequently, work arounds are published like here: > http://02-30-am.blogspot.com/2010/05/blog-post.html > and here: > http://mango.serotoninsoftware.com/forum/posts/list/297.page > and here: > http://mailman.qbang.org/pipermail/rxtx/2009-November/7747407.html > > but still I didn't find a solution which works for me. > > What strikes me is that although this is a well known and serious bug, > which is also reported in bugzilla > (http://bugzilla.qbang.org/show_bug.cgi?id=46) still isn't fixed. > The last stable version of rxtx is almost 5 years old now. > > Is there any progress in rxtx?? > > kindly, > Gerrit. > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Thomas.Damgaard at polycom.com Thu Jan 13 02:47:08 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 09:47:08 +0000 Subject: [Rxtx] RXTX not working with OpenJDK Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Hi, I'm going to try with a more describing mail subject. I'm a Java novice and really need help with this one... See below: Best regards, Thomas Fogh Damgaard From: Damgaard, Thomas Sent: 17. december 2010 20:45 To: 'rxtx at qbang.org' Subject: java.lang.NoClassDefFoundError: gnu/io/PortInUseException Hi, I load the native and Java lib using the jnlp script for my applet: This works fine on Windows and Linux when I'm using Sun's Java. However if I use the standard Java preinstall on Fedora, OpenJDK, I get the following error: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.3) (fedora-49.1.9.3.fc14-i386) OpenJDK Server VM (build 19.0-b09, mixed mode) Exception in thread "Applet" java.lang.NoClassDefFoundError: gnu/io/PortInUseException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.newInstance0(Class.java:343) at java.lang.Class.newInstance(Class.java:325) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:588) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:548) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:729) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:99) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:636) The only difference is what Java I use. I'm using RXTX version 2.2pre2. I would be really helpful if our customers wouldn't have to install Sun's Java. Best regards, Thomas Fogh Damgaard, R&D B.Sc.E.E., Polycom (Denmark) ApS, KIRK Business Unit [cid:image001.gif at 01CB9E27.02480AA0] [cid:image002.jpg at 01CB9E27.02480AA0]Please consider your environmental responsibility before printing this e-mail This communication (including any attachments) may contain privileged or confidential information of Polycom and is intended for a specific individual. If you are not the intended recipient, you should delete this communication, including any attachments without reading or saving them in any manner, and you are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2257 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 851 bytes Desc: image002.jpg URL: From Steffen.DETTMER at ingenico.com Thu Jan 13 06:35:48 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 14:35:48 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> Message-ID: <20110113133548.GE21586@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From Thomas.Damgaard at polycom.com Thu Jan 13 07:11:47 2011 From: Thomas.Damgaard at polycom.com (Damgaard, Thomas) Date: Thu, 13 Jan 2011 14:11:47 +0000 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <20110113133548.GE21586@elberon.bln.de.ingenico.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> Message-ID: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Thanks for the reply! No, I don't get an exception. The applet fails to initialize. I'm not using webstart. The exception is defined in RXTXcomm.jar. (Download from the RXTX wiki page - rxtx-2.2pre2-bins.zip) I've included the full html and jnlp file: index.html: FlashLoader

FlashLoader


jsflashloader-applet.jnlp: FlashLoader Polycom FlashLoader for KIRK 50XX, 60XX and 70XX Thomas Fogh Damgaard Polycom (Denmark) ApS | Direct: +45 7628 1260 | Main: +45 7560 2850 -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Steffen DETTMER Sent: 13. januar 2011 14:36 To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working with OpenJDK * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: [...] > I load the native and Java lib using the jnlp script for my applet: > > > > > > > > > > > > This works fine on Windows and Linux when I'm using Sun's Java. > However if I use the standard Java preinstall on Fedora, OpenJDK, I > get the following error: > > java version "1.6.0_20" > > OpenJDK Runtime Environment (IcedTea6 1.9.3) > (fedora-49.1.9.3.fc14-i386) > > OpenJDK Server VM (build 19.0-b09, mixed mode) > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > gnu/io/PortInUseException > > at > java.lang.Class.getDeclaredConstructors0(Native Method) so you have two problems: first that you get a PortInUseException and second that this exception class cannot be found, right? For the first, the debug log file would be interesting. Does it work when running the app directly on OpenJDK (w/o webstart)? If gnu/io/PortInUseException included in any of the jar files? If so, could it be an issue with the OpenJDK webstart itself? Or some security/protection mechanism (such as protecting from execution of native code libs)? Is it expected that rxtx with native code can be run via Webstart? How should the native lib be delivered to the JVM host? oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Steffen.DETTMER at ingenico.com Thu Jan 13 09:30:49 2011 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 13 Jan 2011 17:30:49 +0100 Subject: [Rxtx] RXTX not working with OpenJDK In-Reply-To: <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> References: <651D981E4B29F74ABD63CE74C2E4788E2F32E57C@SLOMAILPRD01.polycom.com> <20110113133548.GE21586@elberon.bln.de.ingenico.com> <651D981E4B29F74ABD63CE74C2E4788E2F32E57E@SLOMAILPRD01.polycom.com> Message-ID: <20110113163049.GD24580@elberon.bln.de.ingenico.com> * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 14:11 +0000: > Thanks for the reply! > > No, I don't get an exception. The applet fails to initialize. You wrote that you get the error: > * Damgaard, Thomas wrote on Thu, Jan 13, 2011 at 09:47 +0000: > > Exception in thread "Applet" java.lang.NoClassDefFoundError: > > gnu/io/PortInUseException > > at > > java.lang.Class.getDeclaredConstructors0(Native Method) so I think you do get an exception. > I'm not using webstart. Sure that? What are you using to "process" your JNLP file? As far as I know, usually the client browser should invoke Java Web Start (javaws) when a JNLP (Java Network Launching Protocol) is sent by the HTTP server. javaws should create a VM, download and install the jars to the classloader and start the code / main. If this raises an exception, it can be caught by the application. However, if the exception class (file PortInUseException.class) is not in any of the .jar files, the class loader cannot load and instantiate the exception and instead throws a NoClassDefFoundError exception. I think this is what you see. oki, Steffen About Ingenico: Ingenico is a leading provider of payment, transaction and business solutions, with over 15 million terminals deployed in more than 125 countries. Over 3,000 employees worldwide support merchants, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. http://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. P Please consider the environment before printing this e-mail From steffen at koehlers.de Sun Jan 16 12:19:41 2011 From: steffen at koehlers.de (=?ISO-8859-15?Q?Steffen_K=F6hler?=) Date: Sun, 16 Jan 2011 20:19:41 +0100 Subject: [Rxtx] RXTX fails on Windows when Bluetooth generates two COM ports In-Reply-To: <4D22FBFD.5050004@koehlers.de> References: <4D22FBFD.5050004@koehlers.de> Message-ID: <4D3344CD.80003@koehlers.de> Am I really the ONLY ONE having this problem??? Am 04.01.2011 11:52, schrieb Steffen K?hler: > Hello RXTX- Team > > as I couldn't find anything in the mail achive (?), I would like to > highlight the following problem: > > Depending on the bluet