From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help? From indtiny at gmail.com Thu Nov 3 06:22:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Thu, 3 Nov 2011 17:52:39 +0530 Subject: [Rxtx] Simple Javacode : Error javax.comm Message-ID: Hi, I have downloaded and placed RXTXComm.jar and librxtxSerial.so and placed at RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm not able to compile the simple code I get the following error javax.comm does not exist import javax.comm.*; ^ SimpleWrite.java:8: cannot find symbol symbol : variable CommPortIdentifier location: class SimpleWrite Enumeration ports = CommPortIdentifier.getPortIdentifiers(); ^ SimpleWrite.java:10: cannot find symbol symbol : class CommPortIdentifier location: class SimpleWrite CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); ^ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Thu Nov 3 22:18:17 2011 From: indtiny at gmail.com (Indtiny s) Date: Fri, 4 Nov 2011 09:48:17 +0530 Subject: [Rxtx] Simple Javacode : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From indtiny at gmail.com Tue Nov 8 10:48:39 2011 From: indtiny at gmail.com (Indtiny s) Date: Tue, 8 Nov 2011 23:18:39 +0530 Subject: [Rxtx] : Error RXTXCommDriver Message-ID: Hi, I have downloaded and placed the following files RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . But I'm able to compile the simple code but I cant run, when I run the code I get the following error ERROR: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver though I have placed this javax.comm.properties to the jre/ext/ .. Here with I have attached my code . pls help -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SimpleWrite.java Type: text/x-java Size: 580 bytes Desc: not available URL: From msemtd at googlemail.com Wed Nov 9 03:34:02 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:34:02 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: OK, I've had a look at this (since it's been posted 3 times with no reply!) -- I used an Ubuntu machine with OpenJDK and downloaded the RXTX from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip Following the instructions in the INSTALL file I saw that it says to copy RXTXcomm.jar into /jre/lib/ext (under java) and librxtxSerial.so into /jre/lib/[machine type]. So what's the problem? > I have downloaded and placed ?the following files > > ?RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar > librxtxSerial.so -> > /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so . Right, so /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcomm.jar should be /usr/lib/jvm/java-6-openjdk/jre/lib/ext/RXTXcomm.jar Simple, no? From msemtd at googlemail.com Wed Nov 9 03:47:59 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 9 Nov 2011 10:47:59 +0000 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: Oh yeah, forgot to mention that the imports are wrong too: should be... import gnu.io.*; HTH Regards, Michael Erskine. From ddevecchio at celestron.com Wed Nov 9 10:04:11 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 9 Nov 2011 09:04:11 -0800 Subject: [Rxtx] : Error RXTXCommDriver In-Reply-To: References: Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704FAA96167@nubula-vm2> Thanks Michael, I wanted to do this myself, but just got back from a 10 day work-cation trip and I am so far behind I have barely had the chance to touch my development station. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Michael Erskine > Sent: Wednesday, November 09, 2011 2:48 AM > To: rxtx at qbang.org > Subject: Re: [Rxtx] : Error RXTXCommDriver > > Oh yeah, forgot to mention that the imports are wrong too: should be... > > import gnu.io.*; > > HTH > > Regards, > Michael Erskine. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From leucir at gmail.com Mon Nov 14 12:38:10 2011 From: leucir at gmail.com (Leucir Marin) Date: Mon, 14 Nov 2011 17:38:10 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB Message-ID: Hi guys. I'm running on a problema that was opened discussed on this forum, but yet without answers. When I'm reading data from Arduino and disconnect the USB cable, the Java client (using rxtx) began to throw a LOT of error 0x5 (access denied) messages. Is there any way to catch that error in Java and treat it? I already tried to use event listener, but it seems the outside Java's control. Maybe one of you can help to address this issue. Thanks in advance. - Leucir -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Mon Nov 14 13:34:31 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 14 Nov 2011 22:34:31 +0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: Message-ID: On 11/14/11 21:38, "Leucir Marin" wrote: >Hi guys. > >I'm running on a problema that was opened discussed on this forum, but >yet without answers. >When I'm reading data from Arduino and disconnect the USB cable, the Java >client (using rxtx) began to throw a LOT of error 0x5 (access denied) >messages. >Is there any way to catch that error in Java and treat it? I already >tried to use event listener, but it seems the outside Java's control. > >Maybe one of you can help to address this issue. > >Thanks in advance. > >- Leucir Maybe try PureJavaComm: http://www.sparetimelabs.com/purejavacomm/index.html at least you have a chance catch pretty much everything in Java then. br Kusti From msemtd at googlemail.com Mon Nov 14 14:19:00 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Mon, 14 Nov 2011 21:19:00 +0000 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Good luck rewriting Arduino to use purejavacomm! From leucir at gmail.com Tue Nov 15 06:51:58 2011 From: leucir at gmail.com (Leucir Marin) Date: Tue, 15 Nov 2011 11:51:58 -0200 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: Although thinking of moving away from RxTx came up manu time, I still want to use it. However, if there is no way to get that working, I will search for my .Net images I left somewhere in the past.. Still looking for a solution. Thanks. On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > Good luck rewriting Arduino to use purejavacomm! > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Tue Nov 15 10:27:07 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Tue, 15 Nov 2011 14:27:07 -0300 Subject: [Rxtx] error 0x5 - when disconnect USB In-Reply-To: References: Message-ID: +1 for Kusta!, it really works fine in my project (PLCBUS). greetings! 2011/11/15 Leucir Marin > Although thinking of moving away from RxTx came up manu time, I still want > to use it. > However, if there is no way to get that working, I will search for my .Net > images I left somewhere in the past.. > > Still looking for a solution. > > Thanks. > > > On Mon, Nov 14, 2011 at 7:19 PM, Michael Erskine wrote: > >> Good luck rewriting Arduino to use purejavacomm! >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrstan1 at yahoo.com Tue Nov 22 11:11:54 2011 From: adrstan1 at yahoo.com (Adrian Stan) Date: Tue, 22 Nov 2011 10:11:54 -0800 (PST) Subject: [Rxtx] RTS_CONTROL question Message-ID: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Hello, I am an user of RXTX library (through Eclipse RSE Terminal). I have an issue related to reading from a serial device. At some point, I cannot read anymore, even if data is available. The problem is not reproducible with Putty, which reads fine till the end. I have debugged the problem and seems to be located into function?termios_to_DCB(), in file termios.c Here, we have the following piece of code: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fRtsControl = RTS_CONTROL_DISABLE; dcb->fOutxCtsFlow = FALSE; } Here, if RTS/CTS is disabled, we are setting?dcb->fRtsControl = RTS_CONTROL_DISABLE, which doesn't look right. Maybe it should remain set to?RTS_CONTROL_ENABLE. I have modified the code accordingly: if ( s_termios->c_cflag & HARDWARE_FLOW_CONTROL ) { dcb->fRtsControl = RTS_CONTROL_HANDSHAKE; dcb->fOutxCtsFlow = TRUE; } else { dcb->fOutxCtsFlow = FALSE; } After the modification, I could read successfully from the serial device, no more issues were encountered. I have looked in the source code of Putty, to see how they are dealing with this situation. The relevant piece of code is in function?serial_configure(), in file WINSERV.c (from Putty source code) static const char *serial_configure(Serial serial, HANDLE serport, Config *cfg) { ... ?DCB dcb; ... dcb.fRtsControl = RTS_CONTROL_ENABLE; ... switch (cfg->serflow) { ?case SER_FLOW_NONE: ? ?str = "no"; ? ?break; ?case SER_FLOW_XONXOFF: ? ?dcb.fOutX = dcb.fInX = TRUE; ? ?str = "XON/XOFF"; ? ?break; ?case SER_FLOW_RTSCTS: ? ?dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; ? ?dcb.fOutxCtsFlow = TRUE; ? ?str = "RTS/CTS"; ? ?break; ?case SER_FLOW_DSRDTR: ? ?dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; ? ?dcb.fOutxDsrFlow = TRUE; ? ?str = "DSR/DTR"; ? ?break; } ... } So, Putty sets?dcb.fRtsControl to?RTS_CONTROL_HANDSHAKE?if ?RTS/CTS is enabled, but leaves it set to??DTR_CONTROL_ENABLE if??RTS/CTS is NOT enabled. Any input on this issue is highly appreciated. Thanks for your help, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Wed Nov 23 01:41:05 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Wed, 23 Nov 2011 08:41:05 +0000 Subject: [Rxtx] RTS_CONTROL question In-Reply-To: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On 22 November 2011 18:11, Adrian Stan wrote: > Hello, > I am an user of RXTX library (through Eclipse RSE Terminal). > I have an issue related to reading from a serial device. At some point, I > cannot read anymore, even if data is available. Can't you just call setRTS(true) if your device needs it set? BTW: does your device work over a 3-wire cable (RX, TX, GND) or does it require a self-handshaking cable with RTS/CTS joined? Regards, Michael. From tjarvi at qbang.org Wed Nov 23 03:51:24 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 23 Nov 2011 03:51:24 -0700 (MST) Subject: [Rxtx] RTS_CONTROL question In-Reply-To: References: <1321985514.94079.YahooMailNeo@web121009.mail.ne1.yahoo.com> Message-ID: On Wed, 23 Nov 2011, Michael Erskine wrote: > On 22 November 2011 18:11, Adrian Stan wrote: >> Hello, >> I am an user of RXTX library (through Eclipse RSE Terminal). >> I have an issue related to reading from a serial device. At some point, I >> cannot read anymore, even if data is available. > > Can't you just call setRTS(true) if your device needs it set? BTW: > does your device work over a 3-wire cable (RX, TX, GND) or does it > require a self-handshaking cable with RTS/CTS joined? > This discussion is also in bugzilla. http://bugzilla.qbang.org/show_bug.cgi?id=180 -- Trent Jarvi tjarvi at qbang.org From depmar at poczta.onet.pl Thu Nov 24 02:36:20 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Thu, 24 Nov 2011 10:36:20 +0100 Subject: [Rxtx] Lock file in windows Message-ID: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. From tjarvi at qbang.org Thu Nov 24 11:53:04 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 24 Nov 2011 11:53:04 -0700 (MST) Subject: [Rxtx] Lock file in windows In-Reply-To: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> References: <64619024-dbc1cfe8a45dea9f94ddde72976c72e2@pkn5.m5r2.onet> Message-ID: On Thu, 24 Nov 2011, depmar at poczta.onet.pl wrote: > Could you tell me how is port locking mechanism resolved in Windows? In Linux, when port is locked, there is a lock file created in /var/lock. RXTX just tries to open the port exclusively on windows. The linux locking mechanism is part of the linux FHS and is done to prevent stomping on other important services. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES From depmar at poczta.onet.pl Fri Nov 25 01:15:10 2011 From: depmar at poczta.onet.pl (depmar at poczta.onet.pl) Date: Fri, 25 Nov 2011 09:15:10 +0100 Subject: [Rxtx] RXTX Version mismatch Message-ID: <64824947-0333757d1864c4b7c25427bf5a37ff96@pkn5.m5r2.onet> I downloaded rxtx library ver 2.2 from http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip Under Windows I have warning message, when I try to use rxtx for serial communication. WARNING: RXTX Version mismatch ?Jar version = RXTX-2.2pre1 ?native lib Version = RXTX-2.2pre2 Could you help?