From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.kirkland at comcast.net Mon Jan 25 08:55:33 2010 From: m.kirkland at comcast.net (Mike Kirkland) Date: Mon, 25 Jan 2010 07:55:33 -0800 Subject: [Rxtx] One port blocking another port Message-ID: Hi All, I have a program that reads from one com port and writes to another com port. It also does the same thing in reverse (reads from the second com port and writes to the first one. It basically ties two com ports together. One port is very chatty and has a consent stream of data. The other port has very little data. Both ports use a 5000 ms (5 second) time out. The issue I am having is that is appears that the first port's write to the second port is blocked while the second port is waiting for input. The first port's write proceeds only after the second port has timed out. I suppose I could have something twisted around in my code but I was wondering if this is a know issue? TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Mon Jan 25 20:47:55 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 25 Jan 2010 20:47:55 -0700 (MST) Subject: [Rxtx] One port blocking another port In-Reply-To: References: Message-ID: On Mon, 25 Jan 2010, Mike Kirkland wrote: > > Hi All, > > ? > > I have a program that reads from one com port and writes to another com > port. It also does the same thing in reverse (reads from the second com port > and writes to the first one. It basically ties two com ports together. > > ? > > One port is very chatty and has a consent stream of data. The other port has > very little data. > > ? > > Both ports use a 5000 ms (5 second) time out. > > ? > > The issue I am having is that is appears that the first port?s write to the > second port is blocked while the second port is waiting for input. The first > port?s write proceeds only after the second port has timed out. > > ? > > I suppose I could have something twisted around in my code but I was > wondering if this is a know issue? > Hi Kirk, I've not seen a report like this. Perhaps some simple reproduction code will reveal a problem on your end or help us identify a problem in rxtx. I think there are several users doing multiport communication. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.kirkland at comcast.net Mon Jan 25 08:55:33 2010 From: m.kirkland at comcast.net (Mike Kirkland) Date: Mon, 25 Jan 2010 07:55:33 -0800 Subject: [Rxtx] One port blocking another port Message-ID: Hi All, I have a program that reads from one com port and writes to another com port. It also does the same thing in reverse (reads from the second com port and writes to the first one. It basically ties two com ports together. One port is very chatty and has a consent stream of data. The other port has very little data. Both ports use a 5000 ms (5 second) time out. The issue I am having is that is appears that the first port's write to the second port is blocked while the second port is waiting for input. The first port's write proceeds only after the second port has timed out. I suppose I could have something twisted around in my code but I was wondering if this is a know issue? TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Mon Jan 25 20:47:55 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 25 Jan 2010 20:47:55 -0700 (MST) Subject: [Rxtx] One port blocking another port In-Reply-To: References: Message-ID: On Mon, 25 Jan 2010, Mike Kirkland wrote: > > Hi All, > > ? > > I have a program that reads from one com port and writes to another com > port. It also does the same thing in reverse (reads from the second com port > and writes to the first one. It basically ties two com ports together. > > ? > > One port is very chatty and has a consent stream of data. The other port has > very little data. > > ? > > Both ports use a 5000 ms (5 second) time out. > > ? > > The issue I am having is that is appears that the first port?s write to the > second port is blocked while the second port is waiting for input. The first > port?s write proceeds only after the second port has timed out. > > ? > > I suppose I could have something twisted around in my code but I was > wondering if this is a know issue? > Hi Kirk, I've not seen a report like this. Perhaps some simple reproduction code will reveal a problem on your end or help us identify a problem in rxtx. I think there are several users doing multiport communication. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Jan 26 20:25:12 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 26 Jan 2010 19:25:12 -0800 Subject: [Rxtx] enableReceiveFraming ? Message-ID: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> I'm converting a large code base to RXTX from the Sun javax.comm implementation, and have come up with an oddity. On at least some Windows Vista systems, setting enableReceiveFraming(0x03) throws a gnu.io.UnsupportedCommOperationException: Not supported. But it works fine on Mac OS X, and at least some varieties of Linux. So the first question: Is this expected? I could just log & ignore the exception. The program still seems to communicate just file. Foolishly, though, I decided to try to figure out what this options does. Naively, I thought that e.g. enableReceiveFraming(0x03) would result in blocking reads immediately returning when a 0x03 byte appeared in the incoming data stream. If a unknown-length message ended in 0x03, for example, this would save having to wait for a timeout. This understanding is weakly supported by the Sun doc: http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html But there are a number of references on the web that describe something different. They think that enableReceiveFraming(0x03) sets the CommPort to immediately return 0x03 _without_ waiting for any data. In other words, 0x03 is interpreted as an idle character that can be returned immediately. C.f: http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html So the second question is: What does RXTX do with this option? Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.kirkland at comcast.net Mon Jan 25 08:55:33 2010 From: m.kirkland at comcast.net (Mike Kirkland) Date: Mon, 25 Jan 2010 07:55:33 -0800 Subject: [Rxtx] One port blocking another port Message-ID: Hi All, I have a program that reads from one com port and writes to another com port. It also does the same thing in reverse (reads from the second com port and writes to the first one. It basically ties two com ports together. One port is very chatty and has a consent stream of data. The other port has very little data. Both ports use a 5000 ms (5 second) time out. The issue I am having is that is appears that the first port's write to the second port is blocked while the second port is waiting for input. The first port's write proceeds only after the second port has timed out. I suppose I could have something twisted around in my code but I was wondering if this is a know issue? TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Mon Jan 25 20:47:55 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 25 Jan 2010 20:47:55 -0700 (MST) Subject: [Rxtx] One port blocking another port In-Reply-To: References: Message-ID: On Mon, 25 Jan 2010, Mike Kirkland wrote: > > Hi All, > > ? > > I have a program that reads from one com port and writes to another com > port. It also does the same thing in reverse (reads from the second com port > and writes to the first one. It basically ties two com ports together. > > ? > > One port is very chatty and has a consent stream of data. The other port has > very little data. > > ? > > Both ports use a 5000 ms (5 second) time out. > > ? > > The issue I am having is that is appears that the first port?s write to the > second port is blocked while the second port is waiting for input. The first > port?s write proceeds only after the second port has timed out. > > ? > > I suppose I could have something twisted around in my code but I was > wondering if this is a know issue? > Hi Kirk, I've not seen a report like this. Perhaps some simple reproduction code will reveal a problem on your end or help us identify a problem in rxtx. I think there are several users doing multiport communication. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Jan 26 20:25:12 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 26 Jan 2010 19:25:12 -0800 Subject: [Rxtx] enableReceiveFraming ? Message-ID: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> I'm converting a large code base to RXTX from the Sun javax.comm implementation, and have come up with an oddity. On at least some Windows Vista systems, setting enableReceiveFraming(0x03) throws a gnu.io.UnsupportedCommOperationException: Not supported. But it works fine on Mac OS X, and at least some varieties of Linux. So the first question: Is this expected? I could just log & ignore the exception. The program still seems to communicate just file. Foolishly, though, I decided to try to figure out what this options does. Naively, I thought that e.g. enableReceiveFraming(0x03) would result in blocking reads immediately returning when a 0x03 byte appeared in the incoming data stream. If a unknown-length message ended in 0x03, for example, this would save having to wait for a timeout. This understanding is weakly supported by the Sun doc: http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html But there are a number of references on the web that describe something different. They think that enableReceiveFraming(0x03) sets the CommPort to immediately return 0x03 _without_ waiting for any data. In other words, 0x03 is interpreted as an idle character that can be returned immediately. C.f: http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html So the second question is: What does RXTX do with this option? Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From lfarkas at lfarkas.org Wed Jan 27 09:47:04 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Wed, 27 Jan 2010 17:47:04 +0100 Subject: [Rxtx] can't compile cvs as none root Message-ID: <4B606E08.8080408@lfarkas.org> hi, i'm try to build the current rxtx-devel cvs. while it's run the configure i've got the following error (which was not happened in 2.1-7r2). what can be the reason and how can i solve it? thanks in advance. checking whether to enable maintainer-specific portions of Makefiles... no /usr/lib/jvm/java configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/lib/jvm/java checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_0 checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE ------------------------------------------------------ The JCL extension to RxTx requires comm.jar If you intend to use RxTx for commapi support comm.jar needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar You can either quit configure and place the jar in the correct location or let this script do it. ------------------------------------------------------ Do you wish to [Q]uit or use the [S]cript? [Q/S]However, we don't have proper permissions, so please do it as root ******************************************************************* configure is unable to continue. Please try again or manually fix the problem. -- Levente "Si vis pacem para bellum!" From Cougar at CasaDelGato.Com Wed Jan 27 15:43:09 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 27 Jan 2010 14:43:09 -0800 Subject: [Rxtx] missing "fixperm.sh" Message-ID: <4B60C17D.8080601@CasaDelGato.Com> I have a user who is trying to install on OS/X. The problem is that the "fixperm.sh" file seems to be MISSING from the distribution. And I can't find it on the rxtx wiki site. Could someone send me a copy? -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From Ravishankar.N at automotiveinfotronics.com Wed Jan 27 20:46:39 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Thu, 28 Jan 2010 09:16:39 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, , <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD22D@aimail.automotiveinfotronics.com> Finally built it! This helped a lot: http://bbs.archlinux.org/viewtopic.php?id=81607 The configure and configure.in scripts need to be tweaked to include 1.6* May be someone can send a patch... :) Thanks. Ravi ________________________________________ From: Ravishankar N Sent: Friday, January 22, 2010 3:18 PM To: Trent Jarvi Cc: rxtx at qbang.org Subject: RE: [Rxtx] RxTx Toybox-GLIBC error I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.kirkland at comcast.net Mon Jan 25 08:55:33 2010 From: m.kirkland at comcast.net (Mike Kirkland) Date: Mon, 25 Jan 2010 07:55:33 -0800 Subject: [Rxtx] One port blocking another port Message-ID: Hi All, I have a program that reads from one com port and writes to another com port. It also does the same thing in reverse (reads from the second com port and writes to the first one. It basically ties two com ports together. One port is very chatty and has a consent stream of data. The other port has very little data. Both ports use a 5000 ms (5 second) time out. The issue I am having is that is appears that the first port's write to the second port is blocked while the second port is waiting for input. The first port's write proceeds only after the second port has timed out. I suppose I could have something twisted around in my code but I was wondering if this is a know issue? TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Mon Jan 25 20:47:55 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 25 Jan 2010 20:47:55 -0700 (MST) Subject: [Rxtx] One port blocking another port In-Reply-To: References: Message-ID: On Mon, 25 Jan 2010, Mike Kirkland wrote: > > Hi All, > > ? > > I have a program that reads from one com port and writes to another com > port. It also does the same thing in reverse (reads from the second com port > and writes to the first one. It basically ties two com ports together. > > ? > > One port is very chatty and has a consent stream of data. The other port has > very little data. > > ? > > Both ports use a 5000 ms (5 second) time out. > > ? > > The issue I am having is that is appears that the first port?s write to the > second port is blocked while the second port is waiting for input. The first > port?s write proceeds only after the second port has timed out. > > ? > > I suppose I could have something twisted around in my code but I was > wondering if this is a know issue? > Hi Kirk, I've not seen a report like this. Perhaps some simple reproduction code will reveal a problem on your end or help us identify a problem in rxtx. I think there are several users doing multiport communication. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Jan 26 20:25:12 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 26 Jan 2010 19:25:12 -0800 Subject: [Rxtx] enableReceiveFraming ? Message-ID: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> I'm converting a large code base to RXTX from the Sun javax.comm implementation, and have come up with an oddity. On at least some Windows Vista systems, setting enableReceiveFraming(0x03) throws a gnu.io.UnsupportedCommOperationException: Not supported. But it works fine on Mac OS X, and at least some varieties of Linux. So the first question: Is this expected? I could just log & ignore the exception. The program still seems to communicate just file. Foolishly, though, I decided to try to figure out what this options does. Naively, I thought that e.g. enableReceiveFraming(0x03) would result in blocking reads immediately returning when a 0x03 byte appeared in the incoming data stream. If a unknown-length message ended in 0x03, for example, this would save having to wait for a timeout. This understanding is weakly supported by the Sun doc: http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html But there are a number of references on the web that describe something different. They think that enableReceiveFraming(0x03) sets the CommPort to immediately return 0x03 _without_ waiting for any data. In other words, 0x03 is interpreted as an idle character that can be returned immediately. C.f: http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html So the second question is: What does RXTX do with this option? Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From lfarkas at lfarkas.org Wed Jan 27 09:47:04 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Wed, 27 Jan 2010 17:47:04 +0100 Subject: [Rxtx] can't compile cvs as none root Message-ID: <4B606E08.8080408@lfarkas.org> hi, i'm try to build the current rxtx-devel cvs. while it's run the configure i've got the following error (which was not happened in 2.1-7r2). what can be the reason and how can i solve it? thanks in advance. checking whether to enable maintainer-specific portions of Makefiles... no /usr/lib/jvm/java configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/lib/jvm/java checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_0 checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE ------------------------------------------------------ The JCL extension to RxTx requires comm.jar If you intend to use RxTx for commapi support comm.jar needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar You can either quit configure and place the jar in the correct location or let this script do it. ------------------------------------------------------ Do you wish to [Q]uit or use the [S]cript? [Q/S]However, we don't have proper permissions, so please do it as root ******************************************************************* configure is unable to continue. Please try again or manually fix the problem. -- Levente "Si vis pacem para bellum!" From Cougar at CasaDelGato.Com Wed Jan 27 15:43:09 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 27 Jan 2010 14:43:09 -0800 Subject: [Rxtx] missing "fixperm.sh" Message-ID: <4B60C17D.8080601@CasaDelGato.Com> I have a user who is trying to install on OS/X. The problem is that the "fixperm.sh" file seems to be MISSING from the distribution. And I can't find it on the rxtx wiki site. Could someone send me a copy? -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From Ravishankar.N at automotiveinfotronics.com Wed Jan 27 20:46:39 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Thu, 28 Jan 2010 09:16:39 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, , <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD22D@aimail.automotiveinfotronics.com> Finally built it! This helped a lot: http://bbs.archlinux.org/viewtopic.php?id=81607 The configure and configure.in scripts need to be tweaked to include 1.6* May be someone can send a patch... :) Thanks. Ravi ________________________________________ From: Ravishankar N Sent: Friday, January 22, 2010 3:18 PM To: Trent Jarvi Cc: rxtx at qbang.org Subject: RE: [Rxtx] RxTx Toybox-GLIBC error I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 15:33:57 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 15:33:57 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan From santosh.ry at gmail.com Thu Jan 28 15:48:36 2010 From: santosh.ry at gmail.com (Santosh) Date: Thu, 28 Jan 2010 17:48:36 -0500 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan < Pawan.Kharbanda at dot.state.co.us> wrote: > Trent -- > We are upgrading our exisiting OS and JDK on a project that rely heavily > on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and > RedHat 5 on a 64 bit machine. > > Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 > 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux > Red Hat Enterprise Linux Server release 5.4 (Tikanga) > > I tried to run version 2.1.7 r2 on it but not able to see any of my Digi > ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the > problem is with the Digi driver or RXTX. I tried to open a Digi port with > minicom and it worked fine. > > I also tried to get latest from CVS (rxtx-devel) and when I do "configure" > I see this error "./configure: /bin/sh^M: bad interpreter: No such file or > directory". > > Can someone please help me with this? Thanks for the help. > > Pawan > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 16:57:25 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 16:57:25 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 17:12:08 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 17:12:08 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Here is the error i get when i build the src from release-2-1-7 -bash-3.2$ make ( \ \ cd i686-pc-linux-gnu; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/ jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I/opt/jav a1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec - c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialImp.lo;\ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I /opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_tim espec -c /home/jb_stg/rxtx/rxtx-devel/./src/fuserImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ else \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo; \ fi; \ ) gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -fPIC -DPIC -o /hom e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: No such file or directory In file included from /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:113: /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:91: error: expected specifier-qua lifier-list before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'jobject' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:408: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:409: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:410: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:411: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:415: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:416: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:417: error: expected '=', ',', '; ', 'asm' or '__attribute__' before 'is_interrupted' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:418: error: expected declaration specifiers or '...' before 'jint' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:424: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:441: error: expected ')' before ' *' token ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Kharbanda, Pawan Sent: Thursday, January 28, 2010 4:57 PM To: Santosh Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Jan 28 18:31:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:31:19 -0700 (MST) Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: On Thu, 28 Jan 2010, Kharbanda, Pawan wrote: > Here is the error i get when i build the src from release-2-1-7 > ?gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu > de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need > _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c? -fPIC -DPIC -o /hom > e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o > /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: I think there is a dependancy issue if your build does not make the jar the first try. javah gnu/io/* -d . Will generate the .h files if gnu/io/* is the location of the .class files. I ususally build in a temp directory so it is easy to nuke. cd rxtx-devel mkdir build cd build ../configure --options make The digi card ports are not enabled by default. You can modify the source or use properties to enable them. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:41:12 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:41:12 -0700 (MST) Subject: [Rxtx] enableReceiveFraming ? In-Reply-To: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> References: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> Message-ID: On Tue, 26 Jan 2010, Bob Jacobsen wrote: > I'm converting a large code base to RXTX from the Sun javax.comm > implementation, and have come up with an oddity. > On at least some Windows Vista systems, setting enableReceiveFraming(0x03) > throws a gnu.io.UnsupportedCommOperationException: Not supported. But it > works fine on Mac OS X, and at least some varieties of Linux. > So the first question: Is this expected? > I could just log & ignore the exception. The program still seems to > communicate just file. Foolishly, though, I decided to try to figure out > what this options does. Naively, I thought that e.g. > enableReceiveFraming(0x03) would result in blocking reads immediately > returning when a 0x03 byte appeared in the incoming data stream. If a > unknown-length message ended in 0x03, for example, this would save having to > wait for a timeout. This understanding is weakly supported by the Sun doc: > http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html > But there are a number of references on the web that describe something > different. They think that enableReceiveFraming(0x03) sets the CommPort to > immediately return 0x03 _without_ waiting for any data. In other words, 0x03 > is interpreted as an idle character that can be returned immediately. C.f: > http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html > So the second question is: What does RXTX do with this option? Hi Bob, I had no clue what it was supposed to do at the time as the code suggests: /* linux/drivers/char/n_hdlc.c? FIXME taj at www.linux.org.uk */ /** * Receive framing control * @param f framming * @throws UnsupportedCommOperationException */ public void enableReceiveFraming( int f ) throws UnsupportedCommOperationException { if (debug) z.reportln( "RXTXPort:enableReceiveFramming() throwing exception"); throw new UnsupportedCommOperationException( "Not supported" ); } -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:43:58 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:43:58 -0700 (MST) Subject: [Rxtx] can't compile cvs as none root In-Reply-To: <4B606E08.8080408@lfarkas.org> References: <4B606E08.8080408@lfarkas.org> Message-ID: On Wed, 27 Jan 2010, Farkas Levente wrote: > hi, > i'm try to build the current rxtx-devel cvs. while it's run the configure > i've got the following error (which was not happened in 2.1-7r2). what can be > the reason and how can i solve it? > thanks in advance. > > > > checking whether to enable maintainer-specific portions of Makefiles... no > /usr/lib/jvm/java > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is /usr/lib/jvm/java > checking os.name Linux > checking os.arch i386 > checking java.vendor Sun Microsystems Inc. > checking java.version 1.6.0_0 > checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE > ------------------------------------------------------ > The JCL extension to RxTx requires comm.jar > If you intend to use RxTx for commapi support comm.jar > needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar > > You can either quit configure and place the jar in the > correct location or let this script do it. > > ------------------------------------------------------ This is rxtx 2.0 which requires Sun's CommAPI. Please try "cvs co -r commapi-0-0-1 rxtx-devel" which will give you the latest rxtx '2.1' called 2.2 now. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.kirkland at comcast.net Mon Jan 25 08:55:33 2010 From: m.kirkland at comcast.net (Mike Kirkland) Date: Mon, 25 Jan 2010 07:55:33 -0800 Subject: [Rxtx] One port blocking another port Message-ID: Hi All, I have a program that reads from one com port and writes to another com port. It also does the same thing in reverse (reads from the second com port and writes to the first one. It basically ties two com ports together. One port is very chatty and has a consent stream of data. The other port has very little data. Both ports use a 5000 ms (5 second) time out. The issue I am having is that is appears that the first port's write to the second port is blocked while the second port is waiting for input. The first port's write proceeds only after the second port has timed out. I suppose I could have something twisted around in my code but I was wondering if this is a know issue? TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Mon Jan 25 20:47:55 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 25 Jan 2010 20:47:55 -0700 (MST) Subject: [Rxtx] One port blocking another port In-Reply-To: References: Message-ID: On Mon, 25 Jan 2010, Mike Kirkland wrote: > > Hi All, > > ? > > I have a program that reads from one com port and writes to another com > port. It also does the same thing in reverse (reads from the second com port > and writes to the first one. It basically ties two com ports together. > > ? > > One port is very chatty and has a consent stream of data. The other port has > very little data. > > ? > > Both ports use a 5000 ms (5 second) time out. > > ? > > The issue I am having is that is appears that the first port?s write to the > second port is blocked while the second port is waiting for input. The first > port?s write proceeds only after the second port has timed out. > > ? > > I suppose I could have something twisted around in my code but I was > wondering if this is a know issue? > Hi Kirk, I've not seen a report like this. Perhaps some simple reproduction code will reveal a problem on your end or help us identify a problem in rxtx. I think there are several users doing multiport communication. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Jan 26 20:25:12 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 26 Jan 2010 19:25:12 -0800 Subject: [Rxtx] enableReceiveFraming ? Message-ID: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> I'm converting a large code base to RXTX from the Sun javax.comm implementation, and have come up with an oddity. On at least some Windows Vista systems, setting enableReceiveFraming(0x03) throws a gnu.io.UnsupportedCommOperationException: Not supported. But it works fine on Mac OS X, and at least some varieties of Linux. So the first question: Is this expected? I could just log & ignore the exception. The program still seems to communicate just file. Foolishly, though, I decided to try to figure out what this options does. Naively, I thought that e.g. enableReceiveFraming(0x03) would result in blocking reads immediately returning when a 0x03 byte appeared in the incoming data stream. If a unknown-length message ended in 0x03, for example, this would save having to wait for a timeout. This understanding is weakly supported by the Sun doc: http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html But there are a number of references on the web that describe something different. They think that enableReceiveFraming(0x03) sets the CommPort to immediately return 0x03 _without_ waiting for any data. In other words, 0x03 is interpreted as an idle character that can be returned immediately. C.f: http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html So the second question is: What does RXTX do with this option? Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From lfarkas at lfarkas.org Wed Jan 27 09:47:04 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Wed, 27 Jan 2010 17:47:04 +0100 Subject: [Rxtx] can't compile cvs as none root Message-ID: <4B606E08.8080408@lfarkas.org> hi, i'm try to build the current rxtx-devel cvs. while it's run the configure i've got the following error (which was not happened in 2.1-7r2). what can be the reason and how can i solve it? thanks in advance. checking whether to enable maintainer-specific portions of Makefiles... no /usr/lib/jvm/java configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/lib/jvm/java checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_0 checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE ------------------------------------------------------ The JCL extension to RxTx requires comm.jar If you intend to use RxTx for commapi support comm.jar needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar You can either quit configure and place the jar in the correct location or let this script do it. ------------------------------------------------------ Do you wish to [Q]uit or use the [S]cript? [Q/S]However, we don't have proper permissions, so please do it as root ******************************************************************* configure is unable to continue. Please try again or manually fix the problem. -- Levente "Si vis pacem para bellum!" From Cougar at CasaDelGato.Com Wed Jan 27 15:43:09 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 27 Jan 2010 14:43:09 -0800 Subject: [Rxtx] missing "fixperm.sh" Message-ID: <4B60C17D.8080601@CasaDelGato.Com> I have a user who is trying to install on OS/X. The problem is that the "fixperm.sh" file seems to be MISSING from the distribution. And I can't find it on the rxtx wiki site. Could someone send me a copy? -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From Ravishankar.N at automotiveinfotronics.com Wed Jan 27 20:46:39 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Thu, 28 Jan 2010 09:16:39 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, , <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD22D@aimail.automotiveinfotronics.com> Finally built it! This helped a lot: http://bbs.archlinux.org/viewtopic.php?id=81607 The configure and configure.in scripts need to be tweaked to include 1.6* May be someone can send a patch... :) Thanks. Ravi ________________________________________ From: Ravishankar N Sent: Friday, January 22, 2010 3:18 PM To: Trent Jarvi Cc: rxtx at qbang.org Subject: RE: [Rxtx] RxTx Toybox-GLIBC error I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 15:33:57 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 15:33:57 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan From santosh.ry at gmail.com Thu Jan 28 15:48:36 2010 From: santosh.ry at gmail.com (Santosh) Date: Thu, 28 Jan 2010 17:48:36 -0500 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan < Pawan.Kharbanda at dot.state.co.us> wrote: > Trent -- > We are upgrading our exisiting OS and JDK on a project that rely heavily > on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and > RedHat 5 on a 64 bit machine. > > Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 > 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux > Red Hat Enterprise Linux Server release 5.4 (Tikanga) > > I tried to run version 2.1.7 r2 on it but not able to see any of my Digi > ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the > problem is with the Digi driver or RXTX. I tried to open a Digi port with > minicom and it worked fine. > > I also tried to get latest from CVS (rxtx-devel) and when I do "configure" > I see this error "./configure: /bin/sh^M: bad interpreter: No such file or > directory". > > Can someone please help me with this? Thanks for the help. > > Pawan > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 16:57:25 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 16:57:25 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 17:12:08 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 17:12:08 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Here is the error i get when i build the src from release-2-1-7 -bash-3.2$ make ( \ \ cd i686-pc-linux-gnu; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/ jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I/opt/jav a1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec - c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialImp.lo;\ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I /opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_tim espec -c /home/jb_stg/rxtx/rxtx-devel/./src/fuserImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ else \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo; \ fi; \ ) gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -fPIC -DPIC -o /hom e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: No such file or directory In file included from /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:113: /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:91: error: expected specifier-qua lifier-list before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'jobject' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:408: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:409: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:410: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:411: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:415: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:416: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:417: error: expected '=', ',', '; ', 'asm' or '__attribute__' before 'is_interrupted' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:418: error: expected declaration specifiers or '...' before 'jint' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:424: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:441: error: expected ')' before ' *' token ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Kharbanda, Pawan Sent: Thursday, January 28, 2010 4:57 PM To: Santosh Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Jan 28 18:31:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:31:19 -0700 (MST) Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: On Thu, 28 Jan 2010, Kharbanda, Pawan wrote: > Here is the error i get when i build the src from release-2-1-7 > ?gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu > de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need > _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c? -fPIC -DPIC -o /hom > e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o > /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: I think there is a dependancy issue if your build does not make the jar the first try. javah gnu/io/* -d . Will generate the .h files if gnu/io/* is the location of the .class files. I ususally build in a temp directory so it is easy to nuke. cd rxtx-devel mkdir build cd build ../configure --options make The digi card ports are not enabled by default. You can modify the source or use properties to enable them. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:41:12 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:41:12 -0700 (MST) Subject: [Rxtx] enableReceiveFraming ? In-Reply-To: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> References: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> Message-ID: On Tue, 26 Jan 2010, Bob Jacobsen wrote: > I'm converting a large code base to RXTX from the Sun javax.comm > implementation, and have come up with an oddity. > On at least some Windows Vista systems, setting enableReceiveFraming(0x03) > throws a gnu.io.UnsupportedCommOperationException: Not supported. But it > works fine on Mac OS X, and at least some varieties of Linux. > So the first question: Is this expected? > I could just log & ignore the exception. The program still seems to > communicate just file. Foolishly, though, I decided to try to figure out > what this options does. Naively, I thought that e.g. > enableReceiveFraming(0x03) would result in blocking reads immediately > returning when a 0x03 byte appeared in the incoming data stream. If a > unknown-length message ended in 0x03, for example, this would save having to > wait for a timeout. This understanding is weakly supported by the Sun doc: > http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html > But there are a number of references on the web that describe something > different. They think that enableReceiveFraming(0x03) sets the CommPort to > immediately return 0x03 _without_ waiting for any data. In other words, 0x03 > is interpreted as an idle character that can be returned immediately. C.f: > http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html > So the second question is: What does RXTX do with this option? Hi Bob, I had no clue what it was supposed to do at the time as the code suggests: /* linux/drivers/char/n_hdlc.c? FIXME taj at www.linux.org.uk */ /** * Receive framing control * @param f framming * @throws UnsupportedCommOperationException */ public void enableReceiveFraming( int f ) throws UnsupportedCommOperationException { if (debug) z.reportln( "RXTXPort:enableReceiveFramming() throwing exception"); throw new UnsupportedCommOperationException( "Not supported" ); } -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:43:58 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:43:58 -0700 (MST) Subject: [Rxtx] can't compile cvs as none root In-Reply-To: <4B606E08.8080408@lfarkas.org> References: <4B606E08.8080408@lfarkas.org> Message-ID: On Wed, 27 Jan 2010, Farkas Levente wrote: > hi, > i'm try to build the current rxtx-devel cvs. while it's run the configure > i've got the following error (which was not happened in 2.1-7r2). what can be > the reason and how can i solve it? > thanks in advance. > > > > checking whether to enable maintainer-specific portions of Makefiles... no > /usr/lib/jvm/java > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is /usr/lib/jvm/java > checking os.name Linux > checking os.arch i386 > checking java.vendor Sun Microsystems Inc. > checking java.version 1.6.0_0 > checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE > ------------------------------------------------------ > The JCL extension to RxTx requires comm.jar > If you intend to use RxTx for commapi support comm.jar > needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar > > You can either quit configure and place the jar in the > correct location or let this script do it. > > ------------------------------------------------------ This is rxtx 2.0 which requires Sun's CommAPI. Please try "cvs co -r commapi-0-0-1 rxtx-devel" which will give you the latest rxtx '2.1' called 2.2 now. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.kirkland at comcast.net Mon Jan 25 08:55:33 2010 From: m.kirkland at comcast.net (Mike Kirkland) Date: Mon, 25 Jan 2010 07:55:33 -0800 Subject: [Rxtx] One port blocking another port Message-ID: Hi All, I have a program that reads from one com port and writes to another com port. It also does the same thing in reverse (reads from the second com port and writes to the first one. It basically ties two com ports together. One port is very chatty and has a consent stream of data. The other port has very little data. Both ports use a 5000 ms (5 second) time out. The issue I am having is that is appears that the first port's write to the second port is blocked while the second port is waiting for input. The first port's write proceeds only after the second port has timed out. I suppose I could have something twisted around in my code but I was wondering if this is a know issue? TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Mon Jan 25 20:47:55 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 25 Jan 2010 20:47:55 -0700 (MST) Subject: [Rxtx] One port blocking another port In-Reply-To: References: Message-ID: On Mon, 25 Jan 2010, Mike Kirkland wrote: > > Hi All, > > ? > > I have a program that reads from one com port and writes to another com > port. It also does the same thing in reverse (reads from the second com port > and writes to the first one. It basically ties two com ports together. > > ? > > One port is very chatty and has a consent stream of data. The other port has > very little data. > > ? > > Both ports use a 5000 ms (5 second) time out. > > ? > > The issue I am having is that is appears that the first port?s write to the > second port is blocked while the second port is waiting for input. The first > port?s write proceeds only after the second port has timed out. > > ? > > I suppose I could have something twisted around in my code but I was > wondering if this is a know issue? > Hi Kirk, I've not seen a report like this. Perhaps some simple reproduction code will reveal a problem on your end or help us identify a problem in rxtx. I think there are several users doing multiport communication. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Jan 26 20:25:12 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 26 Jan 2010 19:25:12 -0800 Subject: [Rxtx] enableReceiveFraming ? Message-ID: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> I'm converting a large code base to RXTX from the Sun javax.comm implementation, and have come up with an oddity. On at least some Windows Vista systems, setting enableReceiveFraming(0x03) throws a gnu.io.UnsupportedCommOperationException: Not supported. But it works fine on Mac OS X, and at least some varieties of Linux. So the first question: Is this expected? I could just log & ignore the exception. The program still seems to communicate just file. Foolishly, though, I decided to try to figure out what this options does. Naively, I thought that e.g. enableReceiveFraming(0x03) would result in blocking reads immediately returning when a 0x03 byte appeared in the incoming data stream. If a unknown-length message ended in 0x03, for example, this would save having to wait for a timeout. This understanding is weakly supported by the Sun doc: http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html But there are a number of references on the web that describe something different. They think that enableReceiveFraming(0x03) sets the CommPort to immediately return 0x03 _without_ waiting for any data. In other words, 0x03 is interpreted as an idle character that can be returned immediately. C.f: http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html So the second question is: What does RXTX do with this option? Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From lfarkas at lfarkas.org Wed Jan 27 09:47:04 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Wed, 27 Jan 2010 17:47:04 +0100 Subject: [Rxtx] can't compile cvs as none root Message-ID: <4B606E08.8080408@lfarkas.org> hi, i'm try to build the current rxtx-devel cvs. while it's run the configure i've got the following error (which was not happened in 2.1-7r2). what can be the reason and how can i solve it? thanks in advance. checking whether to enable maintainer-specific portions of Makefiles... no /usr/lib/jvm/java configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/lib/jvm/java checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_0 checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE ------------------------------------------------------ The JCL extension to RxTx requires comm.jar If you intend to use RxTx for commapi support comm.jar needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar You can either quit configure and place the jar in the correct location or let this script do it. ------------------------------------------------------ Do you wish to [Q]uit or use the [S]cript? [Q/S]However, we don't have proper permissions, so please do it as root ******************************************************************* configure is unable to continue. Please try again or manually fix the problem. -- Levente "Si vis pacem para bellum!" From Cougar at CasaDelGato.Com Wed Jan 27 15:43:09 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 27 Jan 2010 14:43:09 -0800 Subject: [Rxtx] missing "fixperm.sh" Message-ID: <4B60C17D.8080601@CasaDelGato.Com> I have a user who is trying to install on OS/X. The problem is that the "fixperm.sh" file seems to be MISSING from the distribution. And I can't find it on the rxtx wiki site. Could someone send me a copy? -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From Ravishankar.N at automotiveinfotronics.com Wed Jan 27 20:46:39 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Thu, 28 Jan 2010 09:16:39 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, , <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD22D@aimail.automotiveinfotronics.com> Finally built it! This helped a lot: http://bbs.archlinux.org/viewtopic.php?id=81607 The configure and configure.in scripts need to be tweaked to include 1.6* May be someone can send a patch... :) Thanks. Ravi ________________________________________ From: Ravishankar N Sent: Friday, January 22, 2010 3:18 PM To: Trent Jarvi Cc: rxtx at qbang.org Subject: RE: [Rxtx] RxTx Toybox-GLIBC error I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 15:33:57 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 15:33:57 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan From santosh.ry at gmail.com Thu Jan 28 15:48:36 2010 From: santosh.ry at gmail.com (Santosh) Date: Thu, 28 Jan 2010 17:48:36 -0500 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan < Pawan.Kharbanda at dot.state.co.us> wrote: > Trent -- > We are upgrading our exisiting OS and JDK on a project that rely heavily > on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and > RedHat 5 on a 64 bit machine. > > Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 > 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux > Red Hat Enterprise Linux Server release 5.4 (Tikanga) > > I tried to run version 2.1.7 r2 on it but not able to see any of my Digi > ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the > problem is with the Digi driver or RXTX. I tried to open a Digi port with > minicom and it worked fine. > > I also tried to get latest from CVS (rxtx-devel) and when I do "configure" > I see this error "./configure: /bin/sh^M: bad interpreter: No such file or > directory". > > Can someone please help me with this? Thanks for the help. > > Pawan > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 16:57:25 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 16:57:25 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 17:12:08 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 17:12:08 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Here is the error i get when i build the src from release-2-1-7 -bash-3.2$ make ( \ \ cd i686-pc-linux-gnu; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/ jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I/opt/jav a1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec - c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialImp.lo;\ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I /opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_tim espec -c /home/jb_stg/rxtx/rxtx-devel/./src/fuserImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ else \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo; \ fi; \ ) gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -fPIC -DPIC -o /hom e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: No such file or directory In file included from /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:113: /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:91: error: expected specifier-qua lifier-list before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'jobject' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:408: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:409: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:410: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:411: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:415: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:416: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:417: error: expected '=', ',', '; ', 'asm' or '__attribute__' before 'is_interrupted' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:418: error: expected declaration specifiers or '...' before 'jint' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:424: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:441: error: expected ')' before ' *' token ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Kharbanda, Pawan Sent: Thursday, January 28, 2010 4:57 PM To: Santosh Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Jan 28 18:31:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:31:19 -0700 (MST) Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: On Thu, 28 Jan 2010, Kharbanda, Pawan wrote: > Here is the error i get when i build the src from release-2-1-7 > ?gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu > de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need > _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c? -fPIC -DPIC -o /hom > e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o > /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: I think there is a dependancy issue if your build does not make the jar the first try. javah gnu/io/* -d . Will generate the .h files if gnu/io/* is the location of the .class files. I ususally build in a temp directory so it is easy to nuke. cd rxtx-devel mkdir build cd build ../configure --options make The digi card ports are not enabled by default. You can modify the source or use properties to enable them. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:41:12 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:41:12 -0700 (MST) Subject: [Rxtx] enableReceiveFraming ? In-Reply-To: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> References: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> Message-ID: On Tue, 26 Jan 2010, Bob Jacobsen wrote: > I'm converting a large code base to RXTX from the Sun javax.comm > implementation, and have come up with an oddity. > On at least some Windows Vista systems, setting enableReceiveFraming(0x03) > throws a gnu.io.UnsupportedCommOperationException: Not supported. But it > works fine on Mac OS X, and at least some varieties of Linux. > So the first question: Is this expected? > I could just log & ignore the exception. The program still seems to > communicate just file. Foolishly, though, I decided to try to figure out > what this options does. Naively, I thought that e.g. > enableReceiveFraming(0x03) would result in blocking reads immediately > returning when a 0x03 byte appeared in the incoming data stream. If a > unknown-length message ended in 0x03, for example, this would save having to > wait for a timeout. This understanding is weakly supported by the Sun doc: > http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html > But there are a number of references on the web that describe something > different. They think that enableReceiveFraming(0x03) sets the CommPort to > immediately return 0x03 _without_ waiting for any data. In other words, 0x03 > is interpreted as an idle character that can be returned immediately. C.f: > http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html > So the second question is: What does RXTX do with this option? Hi Bob, I had no clue what it was supposed to do at the time as the code suggests: /* linux/drivers/char/n_hdlc.c? FIXME taj at www.linux.org.uk */ /** * Receive framing control * @param f framming * @throws UnsupportedCommOperationException */ public void enableReceiveFraming( int f ) throws UnsupportedCommOperationException { if (debug) z.reportln( "RXTXPort:enableReceiveFramming() throwing exception"); throw new UnsupportedCommOperationException( "Not supported" ); } -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:43:58 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:43:58 -0700 (MST) Subject: [Rxtx] can't compile cvs as none root In-Reply-To: <4B606E08.8080408@lfarkas.org> References: <4B606E08.8080408@lfarkas.org> Message-ID: On Wed, 27 Jan 2010, Farkas Levente wrote: > hi, > i'm try to build the current rxtx-devel cvs. while it's run the configure > i've got the following error (which was not happened in 2.1-7r2). what can be > the reason and how can i solve it? > thanks in advance. > > > > checking whether to enable maintainer-specific portions of Makefiles... no > /usr/lib/jvm/java > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is /usr/lib/jvm/java > checking os.name Linux > checking os.arch i386 > checking java.vendor Sun Microsystems Inc. > checking java.version 1.6.0_0 > checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE > ------------------------------------------------------ > The JCL extension to RxTx requires comm.jar > If you intend to use RxTx for commapi support comm.jar > needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar > > You can either quit configure and place the jar in the > correct location or let this script do it. > > ------------------------------------------------------ This is rxtx 2.0 which requires Sun's CommAPI. Please try "cvs co -r commapi-0-0-1 rxtx-devel" which will give you the latest rxtx '2.1' called 2.2 now. -- Trent Jarvi tjarvi at qbang.org From snag49ers at gmail.com Sat Jan 30 10:36:30 2010 From: snag49ers at gmail.com (Bill Johnson) Date: Sat, 30 Jan 2010 11:36:30 -0600 Subject: [Rxtx] MakeFile Problems Message-ID: I am trying to install RXTX on Mac OS X Snow Leopard. I have ran all the config files but when I try make I receive the error message: *** No rule to make target `acconfig.h', needed by `stamp-h.in'. Stop. I am learning Unix as I go along and I'm not sure what this error in the Makefile means. Any help would be greatly appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fred_sh at hotmail.com Sat Jan 30 10:58:04 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 30 Jan 2010 12:58:04 -0500 Subject: [Rxtx] Virtual Printer Windows Vista/Windows 7 Message-ID: Hello everyone. Previously I've asked twice about port listing in Windows Vista or Windows 7. I've found a fixed to the rxtxSerial.dll on this website http://erwin.ried.cl/?modo=visor&elemento=265 When I use that .dll now it lists all the ports, even when I have disabled the LPT1 port via Device Manager Configuration. I have redirected the LPT1 port, so it captures a printer in the network. But now it raises a "PortInUseException", googling about it, I don't get to find anything related to parallel ports. Does anyone have a suggestion? I would really appreciate an answer, because in my previous posts nobody actually did. Thankful in advance Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Sat Jan 30 18:19:11 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Sat, 30 Jan 2010 17:19:11 -0800 Subject: [Rxtx] OS/X support Message-ID: <4B64DA8F.6060002@CasaDelGato.Com> So, does ANYONE have RxTx working under OS/X? The distribution .zip is missing the fixperm.sh file, and the OS/X specific .gzip seems to be corrupt. -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From paul at cometway.com Sat Jan 30 19:08:31 2010 From: paul at cometway.com (Paul Cunningham) Date: Sat, 30 Jan 2010 21:08:31 -0500 Subject: [Rxtx] OS/X support In-Reply-To: <4B64DA8F.6060002@CasaDelGato.Com> References: <4B64DA8F.6060002@CasaDelGato.Com> Message-ID: <2F6739C1-D29B-4D1D-9C2F-778690267302@cometway.com> Yes, but I had to build it myself. -pc On Jan 30, 2010, at 8:19 PM, "John G. Lussmyer" wrote: > So, does ANYONE have RxTx working under OS/X? > > The distribution .zip is missing the fixperm.sh file, and the OS/X > specific .gzip seems to be corrupt. > > -- > -- > John G. Lussmyer mailto:Cougar at CasaDelGato.Com > Electric Vehicle Battery Monitoring Systems, http:// > www.CasaDelGato.com > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.kirkland at comcast.net Mon Jan 25 08:55:33 2010 From: m.kirkland at comcast.net (Mike Kirkland) Date: Mon, 25 Jan 2010 07:55:33 -0800 Subject: [Rxtx] One port blocking another port Message-ID: Hi All, I have a program that reads from one com port and writes to another com port. It also does the same thing in reverse (reads from the second com port and writes to the first one. It basically ties two com ports together. One port is very chatty and has a consent stream of data. The other port has very little data. Both ports use a 5000 ms (5 second) time out. The issue I am having is that is appears that the first port's write to the second port is blocked while the second port is waiting for input. The first port's write proceeds only after the second port has timed out. I suppose I could have something twisted around in my code but I was wondering if this is a know issue? TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Mon Jan 25 20:47:55 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 25 Jan 2010 20:47:55 -0700 (MST) Subject: [Rxtx] One port blocking another port In-Reply-To: References: Message-ID: On Mon, 25 Jan 2010, Mike Kirkland wrote: > > Hi All, > > ? > > I have a program that reads from one com port and writes to another com > port. It also does the same thing in reverse (reads from the second com port > and writes to the first one. It basically ties two com ports together. > > ? > > One port is very chatty and has a consent stream of data. The other port has > very little data. > > ? > > Both ports use a 5000 ms (5 second) time out. > > ? > > The issue I am having is that is appears that the first port?s write to the > second port is blocked while the second port is waiting for input. The first > port?s write proceeds only after the second port has timed out. > > ? > > I suppose I could have something twisted around in my code but I was > wondering if this is a know issue? > Hi Kirk, I've not seen a report like this. Perhaps some simple reproduction code will reveal a problem on your end or help us identify a problem in rxtx. I think there are several users doing multiport communication. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Jan 26 20:25:12 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 26 Jan 2010 19:25:12 -0800 Subject: [Rxtx] enableReceiveFraming ? Message-ID: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> I'm converting a large code base to RXTX from the Sun javax.comm implementation, and have come up with an oddity. On at least some Windows Vista systems, setting enableReceiveFraming(0x03) throws a gnu.io.UnsupportedCommOperationException: Not supported. But it works fine on Mac OS X, and at least some varieties of Linux. So the first question: Is this expected? I could just log & ignore the exception. The program still seems to communicate just file. Foolishly, though, I decided to try to figure out what this options does. Naively, I thought that e.g. enableReceiveFraming(0x03) would result in blocking reads immediately returning when a 0x03 byte appeared in the incoming data stream. If a unknown-length message ended in 0x03, for example, this would save having to wait for a timeout. This understanding is weakly supported by the Sun doc: http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html But there are a number of references on the web that describe something different. They think that enableReceiveFraming(0x03) sets the CommPort to immediately return 0x03 _without_ waiting for any data. In other words, 0x03 is interpreted as an idle character that can be returned immediately. C.f: http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html So the second question is: What does RXTX do with this option? Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From lfarkas at lfarkas.org Wed Jan 27 09:47:04 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Wed, 27 Jan 2010 17:47:04 +0100 Subject: [Rxtx] can't compile cvs as none root Message-ID: <4B606E08.8080408@lfarkas.org> hi, i'm try to build the current rxtx-devel cvs. while it's run the configure i've got the following error (which was not happened in 2.1-7r2). what can be the reason and how can i solve it? thanks in advance. checking whether to enable maintainer-specific portions of Makefiles... no /usr/lib/jvm/java configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/lib/jvm/java checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_0 checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE ------------------------------------------------------ The JCL extension to RxTx requires comm.jar If you intend to use RxTx for commapi support comm.jar needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar You can either quit configure and place the jar in the correct location or let this script do it. ------------------------------------------------------ Do you wish to [Q]uit or use the [S]cript? [Q/S]However, we don't have proper permissions, so please do it as root ******************************************************************* configure is unable to continue. Please try again or manually fix the problem. -- Levente "Si vis pacem para bellum!" From Cougar at CasaDelGato.Com Wed Jan 27 15:43:09 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 27 Jan 2010 14:43:09 -0800 Subject: [Rxtx] missing "fixperm.sh" Message-ID: <4B60C17D.8080601@CasaDelGato.Com> I have a user who is trying to install on OS/X. The problem is that the "fixperm.sh" file seems to be MISSING from the distribution. And I can't find it on the rxtx wiki site. Could someone send me a copy? -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From Ravishankar.N at automotiveinfotronics.com Wed Jan 27 20:46:39 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Thu, 28 Jan 2010 09:16:39 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, , <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD22D@aimail.automotiveinfotronics.com> Finally built it! This helped a lot: http://bbs.archlinux.org/viewtopic.php?id=81607 The configure and configure.in scripts need to be tweaked to include 1.6* May be someone can send a patch... :) Thanks. Ravi ________________________________________ From: Ravishankar N Sent: Friday, January 22, 2010 3:18 PM To: Trent Jarvi Cc: rxtx at qbang.org Subject: RE: [Rxtx] RxTx Toybox-GLIBC error I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 15:33:57 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 15:33:57 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan From santosh.ry at gmail.com Thu Jan 28 15:48:36 2010 From: santosh.ry at gmail.com (Santosh) Date: Thu, 28 Jan 2010 17:48:36 -0500 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan < Pawan.Kharbanda at dot.state.co.us> wrote: > Trent -- > We are upgrading our exisiting OS and JDK on a project that rely heavily > on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and > RedHat 5 on a 64 bit machine. > > Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 > 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux > Red Hat Enterprise Linux Server release 5.4 (Tikanga) > > I tried to run version 2.1.7 r2 on it but not able to see any of my Digi > ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the > problem is with the Digi driver or RXTX. I tried to open a Digi port with > minicom and it worked fine. > > I also tried to get latest from CVS (rxtx-devel) and when I do "configure" > I see this error "./configure: /bin/sh^M: bad interpreter: No such file or > directory". > > Can someone please help me with this? Thanks for the help. > > Pawan > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 16:57:25 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 16:57:25 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 17:12:08 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 17:12:08 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Here is the error i get when i build the src from release-2-1-7 -bash-3.2$ make ( \ \ cd i686-pc-linux-gnu; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/ jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I/opt/jav a1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec - c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialImp.lo;\ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I /opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_tim espec -c /home/jb_stg/rxtx/rxtx-devel/./src/fuserImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ else \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo; \ fi; \ ) gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -fPIC -DPIC -o /hom e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: No such file or directory In file included from /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:113: /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:91: error: expected specifier-qua lifier-list before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'jobject' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:408: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:409: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:410: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:411: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:415: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:416: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:417: error: expected '=', ',', '; ', 'asm' or '__attribute__' before 'is_interrupted' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:418: error: expected declaration specifiers or '...' before 'jint' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:424: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:441: error: expected ')' before ' *' token ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Kharbanda, Pawan Sent: Thursday, January 28, 2010 4:57 PM To: Santosh Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Jan 28 18:31:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:31:19 -0700 (MST) Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: On Thu, 28 Jan 2010, Kharbanda, Pawan wrote: > Here is the error i get when i build the src from release-2-1-7 > ?gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu > de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need > _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c? -fPIC -DPIC -o /hom > e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o > /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: I think there is a dependancy issue if your build does not make the jar the first try. javah gnu/io/* -d . Will generate the .h files if gnu/io/* is the location of the .class files. I ususally build in a temp directory so it is easy to nuke. cd rxtx-devel mkdir build cd build ../configure --options make The digi card ports are not enabled by default. You can modify the source or use properties to enable them. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:41:12 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:41:12 -0700 (MST) Subject: [Rxtx] enableReceiveFraming ? In-Reply-To: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> References: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> Message-ID: On Tue, 26 Jan 2010, Bob Jacobsen wrote: > I'm converting a large code base to RXTX from the Sun javax.comm > implementation, and have come up with an oddity. > On at least some Windows Vista systems, setting enableReceiveFraming(0x03) > throws a gnu.io.UnsupportedCommOperationException: Not supported. But it > works fine on Mac OS X, and at least some varieties of Linux. > So the first question: Is this expected? > I could just log & ignore the exception. The program still seems to > communicate just file. Foolishly, though, I decided to try to figure out > what this options does. Naively, I thought that e.g. > enableReceiveFraming(0x03) would result in blocking reads immediately > returning when a 0x03 byte appeared in the incoming data stream. If a > unknown-length message ended in 0x03, for example, this would save having to > wait for a timeout. This understanding is weakly supported by the Sun doc: > http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html > But there are a number of references on the web that describe something > different. They think that enableReceiveFraming(0x03) sets the CommPort to > immediately return 0x03 _without_ waiting for any data. In other words, 0x03 > is interpreted as an idle character that can be returned immediately. C.f: > http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html > So the second question is: What does RXTX do with this option? Hi Bob, I had no clue what it was supposed to do at the time as the code suggests: /* linux/drivers/char/n_hdlc.c? FIXME taj at www.linux.org.uk */ /** * Receive framing control * @param f framming * @throws UnsupportedCommOperationException */ public void enableReceiveFraming( int f ) throws UnsupportedCommOperationException { if (debug) z.reportln( "RXTXPort:enableReceiveFramming() throwing exception"); throw new UnsupportedCommOperationException( "Not supported" ); } -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:43:58 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:43:58 -0700 (MST) Subject: [Rxtx] can't compile cvs as none root In-Reply-To: <4B606E08.8080408@lfarkas.org> References: <4B606E08.8080408@lfarkas.org> Message-ID: On Wed, 27 Jan 2010, Farkas Levente wrote: > hi, > i'm try to build the current rxtx-devel cvs. while it's run the configure > i've got the following error (which was not happened in 2.1-7r2). what can be > the reason and how can i solve it? > thanks in advance. > > > > checking whether to enable maintainer-specific portions of Makefiles... no > /usr/lib/jvm/java > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is /usr/lib/jvm/java > checking os.name Linux > checking os.arch i386 > checking java.vendor Sun Microsystems Inc. > checking java.version 1.6.0_0 > checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE > ------------------------------------------------------ > The JCL extension to RxTx requires comm.jar > If you intend to use RxTx for commapi support comm.jar > needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar > > You can either quit configure and place the jar in the > correct location or let this script do it. > > ------------------------------------------------------ This is rxtx 2.0 which requires Sun's CommAPI. Please try "cvs co -r commapi-0-0-1 rxtx-devel" which will give you the latest rxtx '2.1' called 2.2 now. -- Trent Jarvi tjarvi at qbang.org From snag49ers at gmail.com Sat Jan 30 10:36:30 2010 From: snag49ers at gmail.com (Bill Johnson) Date: Sat, 30 Jan 2010 11:36:30 -0600 Subject: [Rxtx] MakeFile Problems Message-ID: I am trying to install RXTX on Mac OS X Snow Leopard. I have ran all the config files but when I try make I receive the error message: *** No rule to make target `acconfig.h', needed by `stamp-h.in'. Stop. I am learning Unix as I go along and I'm not sure what this error in the Makefile means. Any help would be greatly appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fred_sh at hotmail.com Sat Jan 30 10:58:04 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 30 Jan 2010 12:58:04 -0500 Subject: [Rxtx] Virtual Printer Windows Vista/Windows 7 Message-ID: Hello everyone. Previously I've asked twice about port listing in Windows Vista or Windows 7. I've found a fixed to the rxtxSerial.dll on this website http://erwin.ried.cl/?modo=visor&elemento=265 When I use that .dll now it lists all the ports, even when I have disabled the LPT1 port via Device Manager Configuration. I have redirected the LPT1 port, so it captures a printer in the network. But now it raises a "PortInUseException", googling about it, I don't get to find anything related to parallel ports. Does anyone have a suggestion? I would really appreciate an answer, because in my previous posts nobody actually did. Thankful in advance Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Sat Jan 30 18:19:11 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Sat, 30 Jan 2010 17:19:11 -0800 Subject: [Rxtx] OS/X support Message-ID: <4B64DA8F.6060002@CasaDelGato.Com> So, does ANYONE have RxTx working under OS/X? The distribution .zip is missing the fixperm.sh file, and the OS/X specific .gzip seems to be corrupt. -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From paul at cometway.com Sat Jan 30 19:08:31 2010 From: paul at cometway.com (Paul Cunningham) Date: Sat, 30 Jan 2010 21:08:31 -0500 Subject: [Rxtx] OS/X support In-Reply-To: <4B64DA8F.6060002@CasaDelGato.Com> References: <4B64DA8F.6060002@CasaDelGato.Com> Message-ID: <2F6739C1-D29B-4D1D-9C2F-778690267302@cometway.com> Yes, but I had to build it myself. -pc On Jan 30, 2010, at 8:19 PM, "John G. Lussmyer" wrote: > So, does ANYONE have RxTx working under OS/X? > > The distribution .zip is missing the fixperm.sh file, and the OS/X > specific .gzip seems to be corrupt. > > -- > -- > John G. Lussmyer mailto:Cougar at CasaDelGato.Com > Electric Vehicle Battery Monitoring Systems, http:// > www.CasaDelGato.com > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From bschlining at gmail.com Sun Jan 31 12:07:06 2010 From: bschlining at gmail.com (Brian Schlining) Date: Sun, 31 Jan 2010 11:07:06 -0800 Subject: [Rxtx] OS/X support In-Reply-To: <2F6739C1-D29B-4D1D-9C2F-778690267302@cometway.com> References: <4B64DA8F.6060002@CasaDelGato.Com> <2F6739C1-D29B-4D1D-9C2F-778690267302@cometway.com> Message-ID: Same here, had to build it myself too. I should mention that I've had issues with RXTX crashing the JVM when the jnilib is loaded on some installations of Snow Leopard. On Sat, Jan 30, 2010 at 18:08, Paul Cunningham wrote: > Yes, but I had to build it myself. -pc > > > On Jan 30, 2010, at 8:19 PM, "John G. Lussmyer" > wrote: > > So, does ANYONE have RxTx working under OS/X? >> >> The distribution .zip is missing the fixperm.sh file, and the OS/X >> specific .gzip seems to be corrupt. >> >> -- >> -- >> John G. Lussmyer mailto:Cougar at CasaDelGato.Com >> Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.kirkland at comcast.net Mon Jan 25 08:55:33 2010 From: m.kirkland at comcast.net (Mike Kirkland) Date: Mon, 25 Jan 2010 07:55:33 -0800 Subject: [Rxtx] One port blocking another port Message-ID: Hi All, I have a program that reads from one com port and writes to another com port. It also does the same thing in reverse (reads from the second com port and writes to the first one. It basically ties two com ports together. One port is very chatty and has a consent stream of data. The other port has very little data. Both ports use a 5000 ms (5 second) time out. The issue I am having is that is appears that the first port's write to the second port is blocked while the second port is waiting for input. The first port's write proceeds only after the second port has timed out. I suppose I could have something twisted around in my code but I was wondering if this is a know issue? TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Mon Jan 25 20:47:55 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 25 Jan 2010 20:47:55 -0700 (MST) Subject: [Rxtx] One port blocking another port In-Reply-To: References: Message-ID: On Mon, 25 Jan 2010, Mike Kirkland wrote: > > Hi All, > > ? > > I have a program that reads from one com port and writes to another com > port. It also does the same thing in reverse (reads from the second com port > and writes to the first one. It basically ties two com ports together. > > ? > > One port is very chatty and has a consent stream of data. The other port has > very little data. > > ? > > Both ports use a 5000 ms (5 second) time out. > > ? > > The issue I am having is that is appears that the first port?s write to the > second port is blocked while the second port is waiting for input. The first > port?s write proceeds only after the second port has timed out. > > ? > > I suppose I could have something twisted around in my code but I was > wondering if this is a know issue? > Hi Kirk, I've not seen a report like this. Perhaps some simple reproduction code will reveal a problem on your end or help us identify a problem in rxtx. I think there are several users doing multiport communication. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Jan 26 20:25:12 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 26 Jan 2010 19:25:12 -0800 Subject: [Rxtx] enableReceiveFraming ? Message-ID: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> I'm converting a large code base to RXTX from the Sun javax.comm implementation, and have come up with an oddity. On at least some Windows Vista systems, setting enableReceiveFraming(0x03) throws a gnu.io.UnsupportedCommOperationException: Not supported. But it works fine on Mac OS X, and at least some varieties of Linux. So the first question: Is this expected? I could just log & ignore the exception. The program still seems to communicate just file. Foolishly, though, I decided to try to figure out what this options does. Naively, I thought that e.g. enableReceiveFraming(0x03) would result in blocking reads immediately returning when a 0x03 byte appeared in the incoming data stream. If a unknown-length message ended in 0x03, for example, this would save having to wait for a timeout. This understanding is weakly supported by the Sun doc: http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html But there are a number of references on the web that describe something different. They think that enableReceiveFraming(0x03) sets the CommPort to immediately return 0x03 _without_ waiting for any data. In other words, 0x03 is interpreted as an idle character that can be returned immediately. C.f: http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html So the second question is: What does RXTX do with this option? Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From lfarkas at lfarkas.org Wed Jan 27 09:47:04 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Wed, 27 Jan 2010 17:47:04 +0100 Subject: [Rxtx] can't compile cvs as none root Message-ID: <4B606E08.8080408@lfarkas.org> hi, i'm try to build the current rxtx-devel cvs. while it's run the configure i've got the following error (which was not happened in 2.1-7r2). what can be the reason and how can i solve it? thanks in advance. checking whether to enable maintainer-specific portions of Makefiles... no /usr/lib/jvm/java configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/lib/jvm/java checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_0 checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE ------------------------------------------------------ The JCL extension to RxTx requires comm.jar If you intend to use RxTx for commapi support comm.jar needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar You can either quit configure and place the jar in the correct location or let this script do it. ------------------------------------------------------ Do you wish to [Q]uit or use the [S]cript? [Q/S]However, we don't have proper permissions, so please do it as root ******************************************************************* configure is unable to continue. Please try again or manually fix the problem. -- Levente "Si vis pacem para bellum!" From Cougar at CasaDelGato.Com Wed Jan 27 15:43:09 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 27 Jan 2010 14:43:09 -0800 Subject: [Rxtx] missing "fixperm.sh" Message-ID: <4B60C17D.8080601@CasaDelGato.Com> I have a user who is trying to install on OS/X. The problem is that the "fixperm.sh" file seems to be MISSING from the distribution. And I can't find it on the rxtx wiki site. Could someone send me a copy? -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From Ravishankar.N at automotiveinfotronics.com Wed Jan 27 20:46:39 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Thu, 28 Jan 2010 09:16:39 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, , <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD22D@aimail.automotiveinfotronics.com> Finally built it! This helped a lot: http://bbs.archlinux.org/viewtopic.php?id=81607 The configure and configure.in scripts need to be tweaked to include 1.6* May be someone can send a patch... :) Thanks. Ravi ________________________________________ From: Ravishankar N Sent: Friday, January 22, 2010 3:18 PM To: Trent Jarvi Cc: rxtx at qbang.org Subject: RE: [Rxtx] RxTx Toybox-GLIBC error I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 15:33:57 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 15:33:57 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan From santosh.ry at gmail.com Thu Jan 28 15:48:36 2010 From: santosh.ry at gmail.com (Santosh) Date: Thu, 28 Jan 2010 17:48:36 -0500 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan < Pawan.Kharbanda at dot.state.co.us> wrote: > Trent -- > We are upgrading our exisiting OS and JDK on a project that rely heavily > on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and > RedHat 5 on a 64 bit machine. > > Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 > 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux > Red Hat Enterprise Linux Server release 5.4 (Tikanga) > > I tried to run version 2.1.7 r2 on it but not able to see any of my Digi > ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the > problem is with the Digi driver or RXTX. I tried to open a Digi port with > minicom and it worked fine. > > I also tried to get latest from CVS (rxtx-devel) and when I do "configure" > I see this error "./configure: /bin/sh^M: bad interpreter: No such file or > directory". > > Can someone please help me with this? Thanks for the help. > > Pawan > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 16:57:25 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 16:57:25 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 17:12:08 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 17:12:08 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Here is the error i get when i build the src from release-2-1-7 -bash-3.2$ make ( \ \ cd i686-pc-linux-gnu; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/ jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I/opt/jav a1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec - c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialImp.lo;\ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I /opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_tim espec -c /home/jb_stg/rxtx/rxtx-devel/./src/fuserImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ else \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo; \ fi; \ ) gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -fPIC -DPIC -o /hom e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: No such file or directory In file included from /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:113: /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:91: error: expected specifier-qua lifier-list before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'jobject' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:408: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:409: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:410: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:411: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:415: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:416: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:417: error: expected '=', ',', '; ', 'asm' or '__attribute__' before 'is_interrupted' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:418: error: expected declaration specifiers or '...' before 'jint' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:424: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:441: error: expected ')' before ' *' token ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Kharbanda, Pawan Sent: Thursday, January 28, 2010 4:57 PM To: Santosh Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Jan 28 18:31:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:31:19 -0700 (MST) Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: On Thu, 28 Jan 2010, Kharbanda, Pawan wrote: > Here is the error i get when i build the src from release-2-1-7 > ?gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu > de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need > _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c? -fPIC -DPIC -o /hom > e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o > /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: I think there is a dependancy issue if your build does not make the jar the first try. javah gnu/io/* -d . Will generate the .h files if gnu/io/* is the location of the .class files. I ususally build in a temp directory so it is easy to nuke. cd rxtx-devel mkdir build cd build ../configure --options make The digi card ports are not enabled by default. You can modify the source or use properties to enable them. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:41:12 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:41:12 -0700 (MST) Subject: [Rxtx] enableReceiveFraming ? In-Reply-To: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> References: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> Message-ID: On Tue, 26 Jan 2010, Bob Jacobsen wrote: > I'm converting a large code base to RXTX from the Sun javax.comm > implementation, and have come up with an oddity. > On at least some Windows Vista systems, setting enableReceiveFraming(0x03) > throws a gnu.io.UnsupportedCommOperationException: Not supported. But it > works fine on Mac OS X, and at least some varieties of Linux. > So the first question: Is this expected? > I could just log & ignore the exception. The program still seems to > communicate just file. Foolishly, though, I decided to try to figure out > what this options does. Naively, I thought that e.g. > enableReceiveFraming(0x03) would result in blocking reads immediately > returning when a 0x03 byte appeared in the incoming data stream. If a > unknown-length message ended in 0x03, for example, this would save having to > wait for a timeout. This understanding is weakly supported by the Sun doc: > http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html > But there are a number of references on the web that describe something > different. They think that enableReceiveFraming(0x03) sets the CommPort to > immediately return 0x03 _without_ waiting for any data. In other words, 0x03 > is interpreted as an idle character that can be returned immediately. C.f: > http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html > So the second question is: What does RXTX do with this option? Hi Bob, I had no clue what it was supposed to do at the time as the code suggests: /* linux/drivers/char/n_hdlc.c? FIXME taj at www.linux.org.uk */ /** * Receive framing control * @param f framming * @throws UnsupportedCommOperationException */ public void enableReceiveFraming( int f ) throws UnsupportedCommOperationException { if (debug) z.reportln( "RXTXPort:enableReceiveFramming() throwing exception"); throw new UnsupportedCommOperationException( "Not supported" ); } -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:43:58 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:43:58 -0700 (MST) Subject: [Rxtx] can't compile cvs as none root In-Reply-To: <4B606E08.8080408@lfarkas.org> References: <4B606E08.8080408@lfarkas.org> Message-ID: On Wed, 27 Jan 2010, Farkas Levente wrote: > hi, > i'm try to build the current rxtx-devel cvs. while it's run the configure > i've got the following error (which was not happened in 2.1-7r2). what can be > the reason and how can i solve it? > thanks in advance. > > > > checking whether to enable maintainer-specific portions of Makefiles... no > /usr/lib/jvm/java > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is /usr/lib/jvm/java > checking os.name Linux > checking os.arch i386 > checking java.vendor Sun Microsystems Inc. > checking java.version 1.6.0_0 > checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE > ------------------------------------------------------ > The JCL extension to RxTx requires comm.jar > If you intend to use RxTx for commapi support comm.jar > needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar > > You can either quit configure and place the jar in the > correct location or let this script do it. > > ------------------------------------------------------ This is rxtx 2.0 which requires Sun's CommAPI. Please try "cvs co -r commapi-0-0-1 rxtx-devel" which will give you the latest rxtx '2.1' called 2.2 now. -- Trent Jarvi tjarvi at qbang.org From snag49ers at gmail.com Sat Jan 30 10:36:30 2010 From: snag49ers at gmail.com (Bill Johnson) Date: Sat, 30 Jan 2010 11:36:30 -0600 Subject: [Rxtx] MakeFile Problems Message-ID: I am trying to install RXTX on Mac OS X Snow Leopard. I have ran all the config files but when I try make I receive the error message: *** No rule to make target `acconfig.h', needed by `stamp-h.in'. Stop. I am learning Unix as I go along and I'm not sure what this error in the Makefile means. Any help would be greatly appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fred_sh at hotmail.com Sat Jan 30 10:58:04 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 30 Jan 2010 12:58:04 -0500 Subject: [Rxtx] Virtual Printer Windows Vista/Windows 7 Message-ID: Hello everyone. Previously I've asked twice about port listing in Windows Vista or Windows 7. I've found a fixed to the rxtxSerial.dll on this website http://erwin.ried.cl/?modo=visor&elemento=265 When I use that .dll now it lists all the ports, even when I have disabled the LPT1 port via Device Manager Configuration. I have redirected the LPT1 port, so it captures a printer in the network. But now it raises a "PortInUseException", googling about it, I don't get to find anything related to parallel ports. Does anyone have a suggestion? I would really appreciate an answer, because in my previous posts nobody actually did. Thankful in advance Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Sat Jan 30 18:19:11 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Sat, 30 Jan 2010 17:19:11 -0800 Subject: [Rxtx] OS/X support Message-ID: <4B64DA8F.6060002@CasaDelGato.Com> So, does ANYONE have RxTx working under OS/X? The distribution .zip is missing the fixperm.sh file, and the OS/X specific .gzip seems to be corrupt. -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From paul at cometway.com Sat Jan 30 19:08:31 2010 From: paul at cometway.com (Paul Cunningham) Date: Sat, 30 Jan 2010 21:08:31 -0500 Subject: [Rxtx] OS/X support In-Reply-To: <4B64DA8F.6060002@CasaDelGato.Com> References: <4B64DA8F.6060002@CasaDelGato.Com> Message-ID: <2F6739C1-D29B-4D1D-9C2F-778690267302@cometway.com> Yes, but I had to build it myself. -pc On Jan 30, 2010, at 8:19 PM, "John G. Lussmyer" wrote: > So, does ANYONE have RxTx working under OS/X? > > The distribution .zip is missing the fixperm.sh file, and the OS/X > specific .gzip seems to be corrupt. > > -- > -- > John G. Lussmyer mailto:Cougar at CasaDelGato.Com > Electric Vehicle Battery Monitoring Systems, http:// > www.CasaDelGato.com > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From bschlining at gmail.com Sun Jan 31 12:07:06 2010 From: bschlining at gmail.com (Brian Schlining) Date: Sun, 31 Jan 2010 11:07:06 -0800 Subject: [Rxtx] OS/X support In-Reply-To: <2F6739C1-D29B-4D1D-9C2F-778690267302@cometway.com> References: <4B64DA8F.6060002@CasaDelGato.Com> <2F6739C1-D29B-4D1D-9C2F-778690267302@cometway.com> Message-ID: Same here, had to build it myself too. I should mention that I've had issues with RXTX crashing the JVM when the jnilib is loaded on some installations of Snow Leopard. On Sat, Jan 30, 2010 at 18:08, Paul Cunningham wrote: > Yes, but I had to build it myself. -pc > > > On Jan 30, 2010, at 8:19 PM, "John G. Lussmyer" > wrote: > > So, does ANYONE have RxTx working under OS/X? >> >> The distribution .zip is missing the fixperm.sh file, and the OS/X >> specific .gzip seems to be corrupt. >> >> -- >> -- >> John G. Lussmyer mailto:Cougar at CasaDelGato.Com >> Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop exiting --------------------- JVMDUMP010I System dump written to /home/develop/ph/test/core.20100114.131559.196684.0001.dmp JVMDUMP032I JVM requested Snap dump using '/home/develop/ph/test/Snap.20100114.131559.196684.0002.trc' in response to an event UTE105: Error writing header to tracefile: /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc JVMDUMP010I Snap dump written to /home/develop/ph/test/Snap.20100114.131559.196684.0002.trc UTE107: Error writing to snap file JVMDUMP032I JVM requested Java dump using '/home/develop/ph/test/javacore.20100114.131559.196684.0003.txt' in response to an event JVMDUMP012E Error in Java dump: /home/develop/ph/test/javacore.20100114.131559.196684.0003.txt JVMDUMP013I Processed dump event "gpf", detail "". OS:AIX Version 5 jdk: java version "1.6.0" Java(TM) SE Runtime Environment (build pap6460sr5-20090529_04(SR5)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5-20090519_35743 (JIT enabled, AOT enabled) J9VM - 20090519_035743_BHdSMr JIT - r9_20090518_2017 GC - 20090417_AA) JCL - 20090529_01 Any help would be appreciated. From tjarvi at qbang.org Thu Jan 14 21:26:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Jan 2010 21:26:19 -0700 (MST) Subject: [Rxtx] Porting to AIX In-Reply-To: <201001141408353318296@163.com> References: <201001141408353318296@163.com> Message-ID: On Thu, 14 Jan 2010, ph wrote: > init_threads: get eis > init_threads: set eis > init_threads: stop > drain_loop: looping > ======================================= > check_tiocmget_changes: ioctl(TIOCMGET) > port_has_changed_fionread: change is 23768984 > report_serial_events: sending DATA_AVAILABLE > send_event: !eventloop_interupted > send_event: jclazz > send_event: calling > Unhandled exception > Type=Segmentation error vmState=0x00040000 > J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 > CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) Hi ph, Could you try the current code? I know we had a few 32/64 bit issues (storing ints in Java integers instead of longs.). Examples include fd and eis in RXTXPort.java accessed from SerialImp.c. There have also been concurrency cleanups which could well bite you. http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2.zip or http://www.rxtx.org/cvs.html for the latest. -- Trent Jarvi tjarvi at qbang.org From lfarkas at lfarkas.org Fri Jan 15 04:58:09 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Fri, 15 Jan 2010 12:58:09 +0100 Subject: [Rxtx] 2.1-7 crash on fedora Message-ID: <4B505851.1090807@lfarkas.org> hi, as it can be described in this bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=555219 rxtx-2.1-7 crash on fedora. imho it's an upstream bug and not java. is there any change to newer release of rxtx? regards. -- Levente "Si vis pacem para bellum!" From hemen_punjani at silvertouch.com Sat Jan 16 08:10:47 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Sat, 16 Jan 2010 20:40:47 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 Message-ID: <4B51D6F7.5020309@silvertouch.com> Hi, I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my USB-Serial device. But it work once, then I have to unplug and plug the device to reuse. And I am using the Driver, for communication -- http://www.prolific.com.tw/support/files//IO%20Cable/PL-2303/Drivers%20-%20Generic/MacOS/MacOS%2010.x/md_pl2303H_HX_X_dmg_v1.2.1r2.zip And I have also try it with the RXTX 2.1.7, but not succeed... It gives me error, "Por in use" I have digging so much for the error... but not find the perfect solution. And also is there any clue that I can run the RXTX in java1.6 in MAC OSX. The functionality which I have created in Windows and Linux are running perfectly. But its not working in the MAC!! Please suggest!! Thanks, Hemen... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob_Jacobsen at lbl.gov Sat Jan 16 14:01:39 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Sat, 16 Jan 2010 13:01:39 -0800 Subject: [Rxtx] Clearing stuck ports on Mac OS X? Message-ID: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves the port allocated. When this happens, the port stays locked until the machine is rebooted. Using RXTX-2.2pre2, though getting the warning about version mismatch that's been mentioned before: [java] WARNING: RXTX Version mismatch [java] Jar version = RXTX-2.2pre1 [java] native lib Version = RXTX-2.2pre2 There doesn't seem to be any /var/lock files. Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From tjarvi at qbang.org Sat Jan 16 19:33:54 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Jan 2010 19:33:54 -0700 (MST) Subject: [Rxtx] Clearing stuck ports on Mac OS X? In-Reply-To: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> References: <2A69680D-BCFB-4917-8DEE-1A2A790C17F5@lbl.gov> Message-ID: On Sat, 16 Jan 2010, Bob Jacobsen wrote: > Debugging a RTX-using program on Mac OS X 10.5 with XCode sometimes leaves > the port allocated. When this happens, the port stays locked until the > machine is rebooted. > > Using RXTX-2.2pre2, though getting the warning about version mismatch that's > been mentioned before: > > [java] WARNING: RXTX Version mismatch > [java] Jar version = RXTX-2.2pre1 > [java] native lib Version = RXTX-2.2pre2 > > There doesn't seem to be any /var/lock files. > /var/lock is not needed on Mac, the API allows an exclusive lock to be made via: // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) -- Trent Jarvi tjarvi at qbang.org From mariusz.dec at gmail.com Sun Jan 17 09:03:54 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sun, 17 Jan 2010 17:03:54 +0100 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <4B51D6F7.5020309@silvertouch.com> References: <4B51D6F7.5020309@silvertouch.com> Message-ID: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> 2010/1/16 hemen > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it works with my > USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one application session? 1. Do you close serial port? - "Port in use" looks like opened and and not closed... In Linux and Win closing application with RXTX closes serial as well even without close command. Maybe in MAC not. 2. Try to use another (chip/driver vendor) USB-serial dongle. I am using FTDI and my application Win/Linux/Mac works ok. Mariusz _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hemen_punjani at silvertouch.com Sun Jan 17 23:06:46 2010 From: hemen_punjani at silvertouch.com (hemen) Date: Mon, 18 Jan 2010 11:36:46 +0530 Subject: [Rxtx] Properly Not working RXTX 2.0.7 In-Reply-To: <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> References: <4B51D6F7.5020309@silvertouch.com> <73a89f361001170803l26c273fdl18f51fc77cc56d9f@mail.gmail.com> Message-ID: <4B53FA76.3020300@silvertouch.com> Hi Mariusz, Thanks, for your response... When I run the "SimpleWrite" Demo in rxtx... "Once" means when I first time run the above program it runs perfect, then again I will try to run the same code, it will not run... I need to unplug and plug device, then and then only device will run.... i.e. it will run once then again I have to unplug and plug device for run next time.... Yes, I have already wrote code for closing ports. Thanks, Hemen Mariusz Dec wrote: > > 2010/1/16 hemen > > > Hi, > > I am trying to use RXTX 2.0.7(Java 1.5 in MAC OSX 10.5.8). it > works with my USB-Serial device. > But it work once, then I have to unplug and plug the device to reuse. > > What does it means "once" - one byte, one transmission, one > application session? > > 1. Do you close serial port? - "Port in use" looks like opened and and > not closed... > In Linux and Win closing application with RXTX closes serial as well > even without close command. Maybe in MAC not. > > 2. Try to use another (chip/driver vendor) USB-serial dongle. > I am using FTDI and my application Win/Linux/Mac works ok. > > Mariusz > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ravishankar.N at automotiveinfotronics.com Mon Jan 18 03:39:14 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Mon, 18 Jan 2010 16:09:14 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From Ravishankar.N at automotiveinfotronics.com Tue Jan 19 20:50:24 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Wed, 20 Jan 2010 09:20:24 +0530 Subject: [Rxtx] FW: RxTx Toybox-GLIBC error Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912D954CA@aimail.automotiveinfotronics.com> Any inputs folks? Sorry for re-posting but I could use any hints that you might have. Has anybody actually used the Toybox ports on arm-linux? If yes, which jvm and glibc did you use? Thanks. Ravi -----Original Message----- Sent: Monday, January 18, 2010 4:09 PM Subject: RxTx Toybox-GLIBC error Hello, After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: /********************************************************** java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at ShowPorts.main(ShowPorts.java:6) **********************************************************/ Does this mean i need to downgrade my glibc (i'm using 2.5) or am i missing something else? I also cross compiled and installed RxTx from the source and yet got the same error. This might be helpful (?) info: root at freescale /ejre1.6.0_10/lib/arm$ ldd librxtxSerial.so ./librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./librxtxSerial.so) ./librxtxSerial.so: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./librxtxSerial.so) libpthread.so.0 => /lib/libpthread.so.0 (0x40015000) libc.so.6 => /lib/libc.so.6 (0x40032000) /lib/ld-linux.so.3 (0x2a000000) Thanks and regards, Ravi From tjarvi at qbang.org Wed Jan 20 06:02:08 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 20 Jan 2010 06:02:08 -0700 (MST) Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com> Message-ID: On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Wed Jan 20 06:33:09 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Wed, 20 Jan 2010 08:33:09 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: hello everyone. I've written before about port listing in Windows Vista and sadly I had no answer. Repeating again the situation. In Windows XP I could capture a shared printer and disabling the LPT1 port on my pc via Device Manager Configuration, by doing all this using RXTX, the piece of software using RXTX actually reads that there's a LPT1 port and even prints through it. Now what happens in Windows Vista or Windows 7 is that, by doing the exact same thing I used to do on Windows XP, the LPT1 is not detected. Checking parts of the code, I notice that, the port listing comes from the Parallel.dll, I don't know much about what that library says, but I would like the solution or clues to solve this, because it's really important that this works as it was on Windows XP. Please I would really appreciate an answer and I'm sorry for writing about this issue for the second time. Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Thu Jan 21 04:16:28 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 21 Jan 2010 06:16:28 -0500 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: Hi All, I stumbled upon software called "serial proxy", available at the bottom of http://www.arduino.cc/en/Main/Software This is a serial port to network bridge. The interface provides simple character IO (i.e., you cannot control DTR lines). You don't control baud rate, stop bits, start bits, etc. Does anyone know of a serial proxy equivalent with a little more serial port control? Something multi-platform and open-source is a must. Virtual serial port is a windows-only closed-source product: http://www.hw-group.com/products/hw_vsp/index_en.html Multi-com is a mac-only, open-source product: http://members.iinet.net.au/~mgl/MartysPlace/MultiCom.html http://en.wikipedia.org/wiki/COM_port_redirector has more background. Thanks! - DL From michael.erskine at ketech.com Thu Jan 21 05:53:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 21 Jan 2010 12:53:25 +0000 Subject: [Rxtx] serial proxy In-Reply-To: References: Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. > Douglas Lyon > Sent: 21 January 2010 11:16 > To: rxtx at qbang.org > Subject: [Rxtx] serial proxy > > Hi All, > I stumbled upon software called "serial proxy", > Does anyone know of a serial proxy equivalent with a little > more serial port control? Something multi-platform > and open-source is a must. Whilst not multi-platform, com0com (http://com0com.sourceforge.net/) is open-source (naturally!) and excellent for Win32 systems. It includes com2tcp and hub4com which together can build quite elaborate serial-TCP/IP client/server bridges/proxies/whatever-you-care-to-name-them systems. Regards, Michael Erskine. From Ravishankar.N at automotiveinfotronics.com Fri Jan 22 02:48:04 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Fri, 22 Jan 2010 15:18:04 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From fred_sh at hotmail.com Sat Jan 23 09:30:56 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 23 Jan 2010 11:30:56 -0500 Subject: [Rxtx] Windows Vista Port Listing Message-ID: Hello everyone again. I'm still having a port listing issue using Windows Vista. A brief to what I had in the past and what I need now is as following: Scenario A - Windows XP - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration - RXTX maps and prints through it Scenario B - Windows Vista - Virtual Printer to LPT1 port - Disabled LPT1 port via Device Manager Configuration ================================================== - RXTX DOES NOT MAP LPT1 PORT, raising a NoSuchPortException ================================================== Scenario C - Windows Vista - Virtual Printer to LPT1 port - Enabled LPT1 port =================================================================================== - RXTX MAPS LPT1 PORT, but it raises an IOException, indicating that the printer has no paper (which is false) =================================================================================== I would that at least one scenario using Windows Vista would work. Anyone has any advice?? Thankful in advance. Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.kirkland at comcast.net Mon Jan 25 08:55:33 2010 From: m.kirkland at comcast.net (Mike Kirkland) Date: Mon, 25 Jan 2010 07:55:33 -0800 Subject: [Rxtx] One port blocking another port Message-ID: Hi All, I have a program that reads from one com port and writes to another com port. It also does the same thing in reverse (reads from the second com port and writes to the first one. It basically ties two com ports together. One port is very chatty and has a consent stream of data. The other port has very little data. Both ports use a 5000 ms (5 second) time out. The issue I am having is that is appears that the first port's write to the second port is blocked while the second port is waiting for input. The first port's write proceeds only after the second port has timed out. I suppose I could have something twisted around in my code but I was wondering if this is a know issue? TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Mon Jan 25 20:47:55 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 25 Jan 2010 20:47:55 -0700 (MST) Subject: [Rxtx] One port blocking another port In-Reply-To: References: Message-ID: On Mon, 25 Jan 2010, Mike Kirkland wrote: > > Hi All, > > ? > > I have a program that reads from one com port and writes to another com > port. It also does the same thing in reverse (reads from the second com port > and writes to the first one. It basically ties two com ports together. > > ? > > One port is very chatty and has a consent stream of data. The other port has > very little data. > > ? > > Both ports use a 5000 ms (5 second) time out. > > ? > > The issue I am having is that is appears that the first port?s write to the > second port is blocked while the second port is waiting for input. The first > port?s write proceeds only after the second port has timed out. > > ? > > I suppose I could have something twisted around in my code but I was > wondering if this is a know issue? > Hi Kirk, I've not seen a report like this. Perhaps some simple reproduction code will reveal a problem on your end or help us identify a problem in rxtx. I think there are several users doing multiport communication. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Jan 26 20:25:12 2010 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 26 Jan 2010 19:25:12 -0800 Subject: [Rxtx] enableReceiveFraming ? Message-ID: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> I'm converting a large code base to RXTX from the Sun javax.comm implementation, and have come up with an oddity. On at least some Windows Vista systems, setting enableReceiveFraming(0x03) throws a gnu.io.UnsupportedCommOperationException: Not supported. But it works fine on Mac OS X, and at least some varieties of Linux. So the first question: Is this expected? I could just log & ignore the exception. The program still seems to communicate just file. Foolishly, though, I decided to try to figure out what this options does. Naively, I thought that e.g. enableReceiveFraming(0x03) would result in blocking reads immediately returning when a 0x03 byte appeared in the incoming data stream. If a unknown-length message ended in 0x03, for example, this would save having to wait for a timeout. This understanding is weakly supported by the Sun doc: http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html But there are a number of references on the web that describe something different. They think that enableReceiveFraming(0x03) sets the CommPort to immediately return 0x03 _without_ waiting for any data. In other words, 0x03 is interpreted as an idle character that can be returned immediately. C.f: http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html So the second question is: What does RXTX do with this option? Bob -- Bob Jacobsen, LBNL Bob_Jacobsen at lbl.gov +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From lfarkas at lfarkas.org Wed Jan 27 09:47:04 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Wed, 27 Jan 2010 17:47:04 +0100 Subject: [Rxtx] can't compile cvs as none root Message-ID: <4B606E08.8080408@lfarkas.org> hi, i'm try to build the current rxtx-devel cvs. while it's run the configure i've got the following error (which was not happened in 2.1-7r2). what can be the reason and how can i solve it? thanks in advance. checking whether to enable maintainer-specific portions of Makefiles... no /usr/lib/jvm/java configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/lib/jvm/java checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.6.0_0 checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE ------------------------------------------------------ The JCL extension to RxTx requires comm.jar If you intend to use RxTx for commapi support comm.jar needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar You can either quit configure and place the jar in the correct location or let this script do it. ------------------------------------------------------ Do you wish to [Q]uit or use the [S]cript? [Q/S]However, we don't have proper permissions, so please do it as root ******************************************************************* configure is unable to continue. Please try again or manually fix the problem. -- Levente "Si vis pacem para bellum!" From Cougar at CasaDelGato.Com Wed Jan 27 15:43:09 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 27 Jan 2010 14:43:09 -0800 Subject: [Rxtx] missing "fixperm.sh" Message-ID: <4B60C17D.8080601@CasaDelGato.Com> I have a user who is trying to install on OS/X. The problem is that the "fixperm.sh" file seems to be MISSING from the distribution. And I can't find it on the rxtx wiki site. Could someone send me a copy? -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From Ravishankar.N at automotiveinfotronics.com Wed Jan 27 20:46:39 2010 From: Ravishankar.N at automotiveinfotronics.com (Ravishankar N) Date: Thu, 28 Jan 2010 09:16:39 +0530 Subject: [Rxtx] RxTx Toybox-GLIBC error In-Reply-To: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> References: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD220@aimail.automotiveinfotronics.com>, , <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD225@aimail.automotiveinfotronics.com> Message-ID: <3E7F2F2A885AA84997FE3DFF6C2B101F6912CBD22D@aimail.automotiveinfotronics.com> Finally built it! This helped a lot: http://bbs.archlinux.org/viewtopic.php?id=81607 The configure and configure.in scripts need to be tweaked to include 1.6* May be someone can send a patch... :) Thanks. Ravi ________________________________________ From: Ravishankar N Sent: Friday, January 22, 2010 3:18 PM To: Trent Jarvi Cc: rxtx at qbang.org Subject: RE: [Rxtx] RxTx Toybox-GLIBC error I cross-built it for my arm target platform. I get the following error: ------------------------------------------------------------------------------------------- java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCor java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver ------------------------------------------------------------------------------------------- The problem does not seem to be new: http://mailman.qbang.org/pipermail/rxtx/2007-May/4917379.html Is it a problem with the jre version(1.6)? My target supports IOCTLs ________________________________________ From: Trent Jarvi [tjarvi at qbang.org] Sent: Wednesday, January 20, 2010 6:32 PM To: Ravishankar N Cc: rxtx at qbang.org Subject: Re: [Rxtx] RxTx Toybox-GLIBC error On Mon, 18 Jan 2010, Ravishankar N wrote: > Hello, > > After installing RxTx (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Linux/) on Sun's embedded JRE (evaluation version) for the Freescale imx 25 processor (arm 9,Linux 2.6 ), i tried to run a sample port enumeration program which gave me the following error: > > /********************************************************** > > java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) thrown while loading gnu.io.RXTXCommDriver > Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejre1.6.0_10/lib/arm/librxtxSerial.so: /lib/libpthread.so.0: version `GLIBC_2.0' not found (required by /ejre1.6.0_10/lib/arm/librxtxSerial.so) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1695) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) > at ShowPorts.main(ShowPorts.java:6) > I would try compiling rxtx for your arm platform. It looks like a glibc mismatch. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 15:33:57 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 15:33:57 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan From santosh.ry at gmail.com Thu Jan 28 15:48:36 2010 From: santosh.ry at gmail.com (Santosh) Date: Thu, 28 Jan 2010 17:48:36 -0500 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: Message-ID: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan < Pawan.Kharbanda at dot.state.co.us> wrote: > Trent -- > We are upgrading our exisiting OS and JDK on a project that rely heavily > on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and > RedHat 5 on a 64 bit machine. > > Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 > 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux > Red Hat Enterprise Linux Server release 5.4 (Tikanga) > > I tried to run version 2.1.7 r2 on it but not able to see any of my Digi > ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the > problem is with the Digi driver or RXTX. I tried to open a Digi port with > minicom and it worked fine. > > I also tried to get latest from CVS (rxtx-devel) and when I do "configure" > I see this error "./configure: /bin/sh^M: bad interpreter: No such file or > directory". > > Can someone please help me with this? Thanks for the help. > > Pawan > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 16:57:25 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 16:57:25 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Thu Jan 28 17:12:08 2010 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 28 Jan 2010 17:12:08 -0700 Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: Here is the error i get when i build the src from release-2-1-7 -bash-3.2$ make ( \ \ cd i686-pc-linux-gnu; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/ jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I/opt/jav a1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec - c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialImp.lo;\ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=compile gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/include -I /opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_tim espec -c /home/jb_stg/rxtx/rxtx-devel/./src/fuserImp.c -o \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo \ /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/fuserImp. lo; \ else \ /bin/sh /home/jb_stg/rxtx/rxtx-devel/libtool --mode=link gcc -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -lpthread -release 2.1-7 -o librxtxSerial.la -rpath /home/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/SerialIm p.lo; \ fi; \ ) gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c -fPIC -DPIC -o /hom e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: No such file or directory In file included from /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:113: /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:91: error: expected specifier-qua lifier-list before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'JNIEnv' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:407: error: expected declaration specifiers or '...' before 'jobject' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:408: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:409: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:410: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:411: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:415: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:416: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:417: error: expected '=', ',', '; ', 'asm' or '__attribute__' before 'is_interrupted' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:418: error: expected declaration specifiers or '...' before 'jint' /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:424: error: expected ')' before ' *' token /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.h:441: error: expected ')' before ' *' token ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Kharbanda, Pawan Sent: Thursday, January 28, 2010 4:57 PM To: Santosh Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat Santosh -- Thank you. That fixed the issue. All -- What CVS branch or release should i use to get the latest RXTX src code. Pawan ________________________________ From: Santosh [mailto:santosh.ry at gmail.com] Sent: Thursday, January 28, 2010 3:49 PM To: Kharbanda, Pawan Cc: Trent Jarvi; rxtx at qbang.org Subject: Re: [Rxtx] RXTX on 64 Bit Redhat error "./configure: /bin/sh^M: bad interpreter: No such file or directory". I think you need to run dos2unix on script files before compiling. Thanks, Santosh On Thu, Jan 28, 2010 at 5:33 PM, Kharbanda, Pawan > wrote: Trent -- We are upgrading our exisiting OS and JDK on a project that rely heavily on RXTX api's. We are now using JDK1.6 32 bit (build 1.6.0_17-b04) and RedHat 5 on a 64 bit machine. Linux tocrhstg02.dot.state.co.us 2.6.18-164.6.1.el5 #1 SMP Tue Oct 27 11:30:06 EDT 2009 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.4 (Tikanga) I tried to run version 2.1.7 r2 on it but not able to see any of my Digi ports I was able to access only /dev/ttyS0 (physical ports). Not sure if the problem is with the Digi driver or RXTX. I tried to open a Digi port with minicom and it worked fine. I also tried to get latest from CVS (rxtx-devel) and when I do "configure" I see this error "./configure: /bin/sh^M: bad interpreter: No such file or directory". Can someone please help me with this? Thanks for the help. Pawan _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Jan 28 18:31:19 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:31:19 -0700 (MST) Subject: [Rxtx] RXTX on 64 Bit Redhat In-Reply-To: References: <4ec9eab61001281448g3dd84910r867619948a4e0d7a@mail.gmail.com> Message-ID: On Thu, 28 Jan 2010, Kharbanda, Pawan wrote: > Here is the error i get when i build the src from release-2-1-7 > ?gcc -I/home/jb_stg/rxtx/rxtx-devel -Ii686-pc-linux-gnu -I. -I/opt/java1.6/inclu > de -I/opt/java1.6/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need > _timespec -c /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c? -fPIC -DPIC -o /hom > e/jb_stg/rxtx/rxtx-devel/i686-pc-linux-gnu/.libs/SerialImp.o > /home/jb_stg/rxtx/rxtx-devel/./src/SerialImp.c:25:29: error: gnu_io_RXTXPort.h: I think there is a dependancy issue if your build does not make the jar the first try. javah gnu/io/* -d . Will generate the .h files if gnu/io/* is the location of the .class files. I ususally build in a temp directory so it is easy to nuke. cd rxtx-devel mkdir build cd build ../configure --options make The digi card ports are not enabled by default. You can modify the source or use properties to enable them. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:41:12 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:41:12 -0700 (MST) Subject: [Rxtx] enableReceiveFraming ? In-Reply-To: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> References: <46E487C6-359A-4548-BFA4-B5B192E1B183@lbl.gov> Message-ID: On Tue, 26 Jan 2010, Bob Jacobsen wrote: > I'm converting a large code base to RXTX from the Sun javax.comm > implementation, and have come up with an oddity. > On at least some Windows Vista systems, setting enableReceiveFraming(0x03) > throws a gnu.io.UnsupportedCommOperationException: Not supported. But it > works fine on Mac OS X, and at least some varieties of Linux. > So the first question: Is this expected? > I could just log & ignore the exception. The program still seems to > communicate just file. Foolishly, though, I decided to try to figure out > what this options does. Naively, I thought that e.g. > enableReceiveFraming(0x03) would result in blocking reads immediately > returning when a 0x03 byte appeared in the incoming data stream. If a > unknown-length message ended in 0x03, for example, this would save having to > wait for a timeout. This understanding is weakly supported by the Sun doc: > http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html > But there are a number of references on the web that describe something > different. They think that enableReceiveFraming(0x03) sets the CommPort to > immediately return 0x03 _without_ waiting for any data. In other words, 0x03 > is interpreted as an idle character that can be returned immediately. C.f: > http://java-api.info/O.Reilly-Java.IO.Second.Edition/0596527500/javaio2-CHP-22-SECT-3.html > So the second question is: What does RXTX do with this option? Hi Bob, I had no clue what it was supposed to do at the time as the code suggests: /* linux/drivers/char/n_hdlc.c? FIXME taj at www.linux.org.uk */ /** * Receive framing control * @param f framming * @throws UnsupportedCommOperationException */ public void enableReceiveFraming( int f ) throws UnsupportedCommOperationException { if (debug) z.reportln( "RXTXPort:enableReceiveFramming() throwing exception"); throw new UnsupportedCommOperationException( "Not supported" ); } -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 28 18:43:58 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 28 Jan 2010 18:43:58 -0700 (MST) Subject: [Rxtx] can't compile cvs as none root In-Reply-To: <4B606E08.8080408@lfarkas.org> References: <4B606E08.8080408@lfarkas.org> Message-ID: On Wed, 27 Jan 2010, Farkas Levente wrote: > hi, > i'm try to build the current rxtx-devel cvs. while it's run the configure > i've got the following error (which was not happened in 2.1-7r2). what can be > the reason and how can i solve it? > thanks in advance. > > > > checking whether to enable maintainer-specific portions of Makefiles... no > /usr/lib/jvm/java > configure: WARNING: using JAVA_HOME environmental variable > adjusted java.home is /usr/lib/jvm/java > checking os.name Linux > checking os.arch i386 > checking java.vendor Sun Microsystems Inc. > checking java.version 1.6.0_0 > checking os.version 2.6.31.12-174.2.3.fc12.i686.PAE > ------------------------------------------------------ > The JCL extension to RxTx requires comm.jar > If you intend to use RxTx for commapi support comm.jar > needs to be located in /usr/lib/jvm/java/jre/lib/ext/comm.jar > > You can either quit configure and place the jar in the > correct location or let this script do it. > > ------------------------------------------------------ This is rxtx 2.0 which requires Sun's CommAPI. Please try "cvs co -r commapi-0-0-1 rxtx-devel" which will give you the latest rxtx '2.1' called 2.2 now. -- Trent Jarvi tjarvi at qbang.org From snag49ers at gmail.com Sat Jan 30 10:36:30 2010 From: snag49ers at gmail.com (Bill Johnson) Date: Sat, 30 Jan 2010 11:36:30 -0600 Subject: [Rxtx] MakeFile Problems Message-ID: I am trying to install RXTX on Mac OS X Snow Leopard. I have ran all the config files but when I try make I receive the error message: *** No rule to make target `acconfig.h', needed by `stamp-h.in'. Stop. I am learning Unix as I go along and I'm not sure what this error in the Makefile means. Any help would be greatly appreciated. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fred_sh at hotmail.com Sat Jan 30 10:58:04 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Sat, 30 Jan 2010 12:58:04 -0500 Subject: [Rxtx] Virtual Printer Windows Vista/Windows 7 Message-ID: Hello everyone. Previously I've asked twice about port listing in Windows Vista or Windows 7. I've found a fixed to the rxtxSerial.dll on this website http://erwin.ried.cl/?modo=visor&elemento=265 When I use that .dll now it lists all the ports, even when I have disabled the LPT1 port via Device Manager Configuration. I have redirected the LPT1 port, so it captures a printer in the network. But now it raises a "PortInUseException", googling about it, I don't get to find anything related to parallel ports. Does anyone have a suggestion? I would really appreciate an answer, because in my previous posts nobody actually did. Thankful in advance Freddy Shimabukuro _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Sat Jan 30 18:19:11 2010 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Sat, 30 Jan 2010 17:19:11 -0800 Subject: [Rxtx] OS/X support Message-ID: <4B64DA8F.6060002@CasaDelGato.Com> So, does ANYONE have RxTx working under OS/X? The distribution .zip is missing the fixperm.sh file, and the OS/X specific .gzip seems to be corrupt. -- -- John G. Lussmyer mailto:Cougar at CasaDelGato.Com Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com From paul at cometway.com Sat Jan 30 19:08:31 2010 From: paul at cometway.com (Paul Cunningham) Date: Sat, 30 Jan 2010 21:08:31 -0500 Subject: [Rxtx] OS/X support In-Reply-To: <4B64DA8F.6060002@CasaDelGato.Com> References: <4B64DA8F.6060002@CasaDelGato.Com> Message-ID: <2F6739C1-D29B-4D1D-9C2F-778690267302@cometway.com> Yes, but I had to build it myself. -pc On Jan 30, 2010, at 8:19 PM, "John G. Lussmyer" wrote: > So, does ANYONE have RxTx working under OS/X? > > The distribution .zip is missing the fixperm.sh file, and the OS/X > specific .gzip seems to be corrupt. > > -- > -- > John G. Lussmyer mailto:Cougar at CasaDelGato.Com > Electric Vehicle Battery Monitoring Systems, http:// > www.CasaDelGato.com > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From bschlining at gmail.com Sun Jan 31 12:07:06 2010 From: bschlining at gmail.com (Brian Schlining) Date: Sun, 31 Jan 2010 11:07:06 -0800 Subject: [Rxtx] OS/X support In-Reply-To: <2F6739C1-D29B-4D1D-9C2F-778690267302@cometway.com> References: <4B64DA8F.6060002@CasaDelGato.Com> <2F6739C1-D29B-4D1D-9C2F-778690267302@cometway.com> Message-ID: Same here, had to build it myself too. I should mention that I've had issues with RXTX crashing the JVM when the jnilib is loaded on some installations of Snow Leopard. On Sat, Jan 30, 2010 at 18:08, Paul Cunningham wrote: > Yes, but I had to build it myself. -pc > > > On Jan 30, 2010, at 8:19 PM, "John G. Lussmyer" > wrote: > > So, does ANYONE have RxTx working under OS/X? >> >> The distribution .zip is missing the fixperm.sh file, and the OS/X >> specific .gzip seems to be corrupt. >> >> -- >> -- >> John G. Lussmyer mailto:Cougar at CasaDelGato.Com >> Electric Vehicle Battery Monitoring Systems, http://www.CasaDelGato.com >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyon at docjava.com Fri Jan 1 07:00:19 2010 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 01 Jan 2010 09:00:19 -0500 Subject: [Rxtx] The RCX model In-Reply-To: References: Message-ID: Hi All, The RCXCommPort provides a common interface for all ports, allowing polymorphism in Lego Mindstorm programming. http://www.javacoffeebreak.com/books/extracts/jini/MindStorms.html#RCXPort public class RCXPort { public RCXPort(String port); public void addRCXListener(RCXListener rl); public boolean open(); public void close(); public boolean isOpen(); public OutputStream getOutputStream(); public InputStream getInputStream(); public synchronized boolean write(byte[] bArray); public String getLastError(); } Also, in Scott Preston's book, "Building Java Robots" http://www.apress.com/book/view/1590595564 has source code available here: http://www.apress.com/resource/bookfile/2381 jrb-1.1.2.jar contains the code. Chapter 2 has: public interface JSerialPort{ public byte[] read(); public String readString(); public void write(byte[] b) throws Exception; public void close(); public void setDTR(boolean dtr); public void setTimeout(int tOut); // added for web public static final String READ_COMMAND = "r"; public static final String WRITE_COMMAND = "w"; public static final String WRITE_READ_COMMAND = "wr"; public byte[] read(byte[] b) throws Exception; public String readString(byte[] b) throws Exception; } webcom.jsp %> <%@ page import="com.scottpreston.javarobot.chapter2.*" %><% // WebClient class will throw exception if these are not set String portId = request.getParameter("portid"); String action = request.getParameter("action"); String cmdInput = request.getParameter("commands"); String timeout = request.getParameter("timeout"); String dtr = request.getParameter("dtr"); try { WebSerialPort com = new WebSerialPort(portId); out.println(com.execute(action,cmdInput,timeout,dtr)); } catch (Exception e) { out.println(e); int term = '!'; %> usage: /webcom.jsp?portid=[1,2,..]&action=[r,w,wr]&commands=[100,120,222,..]&tim eout=[0,50,..]&dtr=true

sample: sample 1 <% }%> provides a high-level interface to the serial port that can run on a thin-client (i.e., one without Java script, Java Applets, JVM's or JNI or Java). The trade-off appears to be using a raw-socket interface, an RMI interface, or a platform and language agnostic interface. With obvious performance and portability trade-offs. All you need do to control the serial port on the server is to formulate the proper URL. Security issues boggle the mind! - Doug From mariusz.dec at gmail.com Sat Jan 2 13:13:17 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Sat, 2 Jan 2010 21:13:17 +0100 Subject: [Rxtx] serial ports on the lan In-Reply-To: <4B3D0D30.20105@ergotech.com> References: <18B8AD48F0FF4D799B4EB3218BC859B3@mdam2> <4B3D0D30.20105@ergotech.com> Message-ID: <73a89f361001021213v3e20b413t68097e2b9e9c20ca@mail.gmail.com> Hi Jim, I have prepared this long answer to explain dependencies between JVM and JNI, especially as an answer for: "no JNI binaries"... I have seen similar solutions, I did one myself as well. Thanks for link, currently I am "on the Air" with another protocols (partially my own). Of course at the Host-end there is an UART (USB). This is very good that we can talk worldwide - this discussion gave me an idea for my system too...:) Regards Mariusz 2009/12/31 Jim Redman > Mariusz, > > One device that is of interest to us is a network device that has a serial > port(s) attached to it - your "RS232_Over_IP". Something like this (from > DIGI): > > http://www.digi.com/products/serialservers/etherlite.jsp#overview > > You interact with these over a socket port so no JNI is required (although > that's not really important to me). Our goal in using RXTX to interact with > these is that we could continue to use our serial code unchanged. I keep > hoping that I'll find time to add this to RXTX, so far no luck. > > The capabilities of the devices vary. On some you can set the serial port > parameters over the network link. On others, you set the parameters, > typically through a web-interface and then just send/receive characters on a > socket port. AFAIK there's no widely adopted standard. > > Jim > > M.Dec-Gazeta wrote: > >> ----- Original Message ----- From: "Dr. Douglas Lyon" >> To: ; >> Sent: Thursday, December 31, 2009 1:24 PM >> Subject: [Rxtx] serial ports on the lan >> >> >> Hi All, >>> >>> More-over, with a network in the substrate, I can run my programs without >>> having to load JNI binaries on every machine. This enables >>> >> >> I think that this is serious mistake in your analysis if we are talking >> about Java environment. >> Java beeing independent of OS platform works on the basis of the lot of >> JNI interfaces prepared for each platform separatelly. >> JNI is the interface between OS/hardware and Java (JVM). >> A lot of Java users don't think about it (or doesn't know also), but this >> is the fact. >> >> No JNI interface in software interacting with hardware, means that this >> software isn't pure Java software - Java software needs JVM, JVM needs JNI >> to "talk" with OS. >> But in any case network interface (soft/hard) which interacts with serial >> (RS-232) needs special part of the binaries (software logic between Network >> and Serial) and doesn't matter this is "JNI" or somewhat. >> Remember that RS232 (serial) is in fact phisical layer with simple >> hardware handshake (CTS/RTS etc.) and has nothing to TCP/IP, UDP, QOS etc >> which are logical layers of the connection. >> Of course in theory you may prepare TCP/IP over RS232 hardware layer but >> it hasn't any sense. >> >> deployment with far greater ease. Now, with an IP address and a port >>> number >>> >> >> You have described protocol "RS232_Over_IP" similar in ideas to >> "Voice_Over_IP". >> Such ideas needs a lot of special binaries - drivers controlling serial >> interfaces in the core of the LAN interfaces software. >> >> It has nothing to RXTX core - RXTX is a part of JVM with JNI for serials >> interfaces for different platforms. >> >> You may prepare overlay to TCP/IP based on RXTX, finally creating >> RS232_Over_IP (RoIP) or better - UART_over_IP - UoIP. :). >> But JNI stiil HAVE TO exists everywhere. >> >> Regards >> and >> Happy New 2010 Year for everybody >> >> Mariusz Dec >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sun Jan 3 16:33:09 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Jan 2010 16:33:09 -0700 (MST) Subject: [Rxtx] [Patch] New feature: Implemented UART_DISCONNECT event In-Reply-To: References: <7E5DCEB5-650B-41F5-A2F3-861B96BAA00F@myller.com> Message-ID: It is unclear to me what the status of this effort is. I do see that it is not in the source code though. Was there a question regarding what to do next? On Fri, 18 Sep 2009, Ilkka Myller wrote: > > > We have a section of methods that are extensions to the API at the bottom of the file. ?These are commented clearly as extensions for javadoc. ?The > register method should go there. > > > I agree. I'll move the method there. > > > 3. Subsequent calls to any RXTXPort IO function (except close() or removeEventListener()) throws PortAlreadyClosedException which is > subclass of IOException --> no code changes necessary if IOExceptions are already handled in user code. This is for backwards > compatibility. > > > > I suspect this is a bit of a problem as it forces people to handle IOExceptions they normally didnt. ?Hmm. ?We may want to look at that again. ?I > personally am OK with it but I think people should look it over. > > > I do not think this is a problem for methods that already did throw IOException, but for those API extension-methods that previously did not? right? > I did not add PortAlreadyClosed exception to any stuff that we inherit from Comm API. I assumed we can change our own extensions relatively freely if necessary. > > I changed the notify....() methods to handle the closed-serial-port -situation by making them do nothing in that case. They only change something if isOpen() > returns true. Therefore they dont have to throw PortAlreadyClosedExceptions. That's fine, because they also dont have to return any values since they are void. > > But those RXTX extension methods that I modified to throw the new exception, usually return some values. If we make them to behave like notify..(), they still > have to return something - with closed serial port. What value would that be? Determining proper return value for those is bit difficult since they obviously > cant call native methods with fd==0.. So basicly, that is why I chose to throw PortAlreadyClosed exception from?them. The alternative did not feel any better. > > I hate to change the API ... even RXTX extensions ... but I think it's the right thing to do here if we want to implement this feature.? > > > As an example, the current implementation with added new exception.... > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException, PortAlreadyClosedException > { > byte ret; > checkPortAlreadyClosed(); > ret = nativeGetParityErrorChar(); > return( ret ); > } > > > ..versus non PortAlreadyClosed -exception alternative.. > > > public byte getParityErrorChar( ) > throws UnsupportedCommOperationException > { > if ( isOpen() == true ) > { > byte ret; > ret = nativeGetParityErrorChar(); > return( ret ); > } else > { > return( ); > } > } > > > Thats the problem. > > We could however, throw UnsupportedCommOperationException and keep the method interface intact. But that would break the contract for the usage/meaning of > UnsupportedCommOperationException ... and causes even more trouble for users. > > > > I worry that there may be paths to deadlock on w32 as various layers try to redundantly make sure a write or read happens.? > > > We dont want that. Did you notice that I replaced fd verification in read/write with new termios_check_fd()'s.? Any ideas? > > > The windows checks are fine vs implementing a POSIX version. > > > I still feel that those checks are not optimal. There should be a cleaner way to verify that device driver responds behind fd.. instead of just requesting status > registers from it.? > > > -- > I > > > > From fred_sh at hotmail.com Mon Jan 4 10:52:37 2010 From: fred_sh at hotmail.com (Freddy Shimabukuro) Date: Mon, 4 Jan 2010 12:52:37 -0500 Subject: [Rxtx] Port listing in Windows Vista Message-ID: Hello everyone. A piece of software prints tickets directly to a dot matrix printer. In one office some terminals were sharing a single printer, all these terminals were are using Windows XP. The printer was captured using NET USE command, and the software using RXTX was detecting and printing the LPT1 port, even when the LPT1 port was disabled using the Device Manager Configuration. The problem came when I started running a tests using Windows Vista, and also I redirected the printer to LPT1, but it is not detected anymore, which was detected on Windows XP. I've been checking the code but I'm still a beginner on this java stuff, I was wondering if there was a way to do this, to detect redirected ports as physical ports, which happens with XP. I was trying to check the code, but I'm still a beginner in java, I was wondering if there's any suggestion about how to do this, if there's not then I'll have to change the way we're printing tickets, although RXTX was really nice to use. Thankful in advance Freddy Shimabukuro _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:19:56 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:19:56 +0100 Subject: [Rxtx] Error 0x5... Message-ID: <4B45A73C.2030106@pwn.pl> An HTML attachment was scrubbed... URL: From lukasz.kozminski at pwn.pl Thu Jan 7 02:36:43 2010 From: lukasz.kozminski at pwn.pl (=?ISO-8859-2?Q?=A3ukasz_Ko=BCmi=F1ski?=) Date: Thu, 07 Jan 2010 10:36:43 +0100 Subject: [Rxtx] Error 0x5... In-Reply-To: References: Message-ID: <4B45AB2B.6030107@pwn.pl> Bug is really old. Any progress? I would appreciate if somebody could provide any update on it? From Steffen.DETTMER at ingenico.com Thu Jan 7 05:31:42 2010 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Thu, 7 Jan 2010 13:31:42 +0100 Subject: [Rxtx] phidgets In-Reply-To: References: <73a89f360912300230j4b38d8edgb8dba2ca57bd58b8@mail.gmail.com> Message-ID: <20100107123142.GD11605@elberon.bln.de.ingenico.com> (OT) * Kustaa Nyholm wrote on Wed, Dec 30, 2009 at 17:01 +0200: > I've recently implemented a couple of devices where I used TCP and > in retrospect I'm confident that I could have done better with > UDP. With TCP , in my case, I needed to have the mechanism to monitor > if the connection is still there (users often unplug/plug cables > for one reason or an other), Did you try enabling SO_KEEPALIVE? Didn't it worked or where there different issues with it? > and mechanism to re-establish the connection and update state > information between the devices. So basically all the mechanism > one needs when dealing with the 'unreliable' UDP protocol PLUS > THE NEED TO MONITOR the connection. I think this could be said a bit too general. I think in TCP often no monitoring is needed because as soon as either side tries to send it should notice the situation, can re-establish and send again (of course for the price of more sent frames). I think in general UDP is better when the application/protocol can somewhat tolerate packet loss, for example if in short traffic overload cases they can just skip for a while (e.g. when traffic is so high that many frames get lost due to bandwidth limitation). TCP can be horrible here, because data will be repeated and all the old data needs to be transmitted (using bandwidth). But working with TCP received data often is so much easier :))) > UDP would have been at least marginally bit simpler. Also I think > it could have resulted in a more responsive system as the > detection of a broken TCP connection and re-establishing it > connection takes several seconds in our system whereas a continuous > UDP packet stream would be up and running in a few milliseconds > once the cable is plugged in. Ohh, this sounds like a difficult requirement. So you want to detect a plugged link within a second or so? When implementing something on top of UDP, some timeouts would be needed. I think in such a setup to detect a lost link within a second or so, timeouts must be smaller that a second, which may be hard to ensure (`guarantee') on a usual PC I think... It is interesting that one or two years ago I had a similar issue where some small embedded device was supposed to detect a link failure quickly. I also used TCP/IP, on Ethernet. I'm not sure if I'm correct, but I would expect that even with UDP it can take a second or so to get ready, for example because of ARP. In my case the solution was to query the ethernet cable link status. In case of `unplugged' I forcible close all TCP connections and in case of `plugged' they could be re-opened if needed. oki, Steffen About Ingenico: Ingenico is a leading provider of payment solutions, with over 15 million terminals deployed in more than 125 countries. Its 2,500 employees worldwide support retailers, banks and service providers to optimize and secure their electronic payments solutions, develop their offer of services and increase their point of sales revenue. More information on http://www.ingenico.com/. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. P Please consider the environment before printing this e-mail From lfarkas at lfarkas.org Thu Jan 7 05:59:05 2010 From: lfarkas at lfarkas.org (Farkas Levente) Date: Thu, 07 Jan 2010 13:59:05 +0100 Subject: [Rxtx] why not build a new releases? Message-ID: <4B45DA99.5040702@lfarkas.org> hi, there was no rxtx release since 4 years. there were many update and bugfix in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 release and why don't you make more frequent release? we all know there a software can never be finished. and we all know that all software has bugs. but it's doesn't prevent anyone to make release. you can make a 2.2 release from the current cvs and make a newer release even in a few weeks if it's turn out there are remaining simple fix for bugs. just my 2c. who are waiting for official 2.2 for years:-( -- Levente "Si vis pacem para bellum!" From damorales at gmail.com Thu Jan 7 06:06:38 2010 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 7 Jan 2010 10:06:38 -0300 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: im agree, please release an update! greetings ! 2010/1/7 Farkas Levente > hi, > there was no rxtx release since 4 years. there were many update and bugfix > in the 2.2 series, but still has no 2.2 release. why don't you make a 2.2 > release and why don't you make more frequent release? we all know there a > software can never be finished. and we all know that all software has bugs. > but it's doesn't prevent anyone to make release. you can make a 2.2 release > from the current cvs and make a newer release even in a few weeks if it's > turn out there are remaining simple fix for bugs. > just my 2c. who are waiting for official 2.2 for years:-( > > -- > Levente "Si vis pacem para bellum!" > _______________________________________________ > 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: 09 643 1802 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.erskine at ketech.com Thu Jan 7 08:06:25 2010 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 7 Jan 2010 15:06:25 +0000 Subject: [Rxtx] why not build a new releases? In-Reply-To: <4B45DA99.5040702@lfarkas.org> References: <4B45DA99.5040702@lfarkas.org> Message-ID: > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Farkas Levente > Subject: [Rxtx] why not build a new releases? > we all > know there a software can never be finished. and we all know that all > software has bugs. but it's doesn't prevent anyone to make release. you > can make a 2.2 release from the current cvs and make a newer release So why don't _you_ do it then? :) Regards, Michael Erskine. From ivmai at mail.ru Thu Jan 7 08:33:42 2010 From: ivmai at mail.ru (Ivan Maidanski) Date: Thu, 07 Jan 2010 18:33:42 +0300 Subject: [Rxtx] Fix for the inconsistent version string Message-ID: Hello! As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). -------------- next part -------------- A non-text attachment was scrubbed... Name: rxtx-devel-ivmai5.diff Type: application/octet-stream Size: 1433 bytes Desc: not available URL: From mortenbo at post3.tele.dk Thu Jan 7 10:34:02 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Thu, 7 Jan 2010 18:34:02 +0100 Subject: [Rxtx] Documentation Message-ID: <8FB6FECF10A14175A1DC3D3091D28432@morten> Does anyone know where to find an index.html documentation on how to use RXTX. Denmark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Thu Jan 7 11:54:43 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Thu, 7 Jan 2010 19:54:43 +0100 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye > Does anyone know where to find an index.html documentation on how to use > RXTX. > > Denmark > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tristan.dyer at cgi.com Thu Jan 7 12:08:30 2010 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 7 Jan 2010 14:08:30 -0500 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D041C8DCD@MTL-MSG-02.cgiclients.com> In general RXTX is a drop-in replacement for Sun's COMM library. Any docs for COMM should relate to RXTX as well. There are some implementation differences though, and for that it is best to read the mailing list. Thanks, -- Tristan Dyer ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Mariusz Dec Sent: January 7, 2010 2:55 PM To: Morten Bo ?lbye Cc: rxtx at qbang.org Subject: Re: [Rxtx] Documentation Hi, This is the biggest problem of the RXTX project - docs :(. But using this isn't complicated if you understand serial communiation problems. Use examples and read mailing list when you will have problems. In the last two months was a lot of important threads with hints for each platform. Regards Mariusz 2010/1/7 Morten Bo ?lbye Does anyone know where to find an index.html documentation on how to use RXTX. Denmark _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Thu Jan 7 13:21:27 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Thu, 7 Jan 2010 22:21:27 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten>, <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> Message-ID: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> >This is the biggest problem of the RXTX project - docs :(. Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's documentation: http://java.sun.com/products/javacomm/reference/api/index.html and it would seem rather pointless to re-create this documentation... and the Sun example should also work I guess. br Kusti From johnny.luong at trustcommerce.com Thu Jan 7 13:59:45 2010 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Thu, 07 Jan 2010 12:59:45 -0800 Subject: [Rxtx] Documentation In-Reply-To: <8FB6FECF10A14175A1DC3D3091D28432@morten> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> Message-ID: <4B464B41.808@trustcommerce.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Morten Bo ?lbye wrote: | Does anyone know where to find an index.html documentation on how to use RXTX. | | Denmark | | | | | ------------------------------------------------------------------------ | | _______________________________________________ | Rxtx mailing list | Rxtx at qbang.org | http://mailman.qbang.org/mailman/listinfo/rxtx Hi Morten, Try: http://rxtx.qbang.org/wiki/index.php/Using_RXTX and looking at the code examples provided there. Best, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv EMMAn15DvMCHqz0940IZPW1QOSlFOnhr =G1CP -----END PGP SIGNATURE----- From mortenbo at post3.tele.dk Fri Jan 8 01:53:37 2010 From: mortenbo at post3.tele.dk (=?iso-8859-1?Q?Morten_Bo_=D8lbye?=) Date: Fri, 8 Jan 2010 09:53:37 +0100 Subject: [Rxtx] Documentation References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <69B3408642494742BD0A5A40FA51D944@morten> Thanks for Your reply. Br Morten Denmark From mariusz.dec at gmail.com Fri Jan 8 01:55:30 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 09:55:30 +0100 Subject: [Rxtx] Documentation In-Reply-To: <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <73a89f361001071054i45c3e0b3yf27728742bd20b2f@mail.gmail.com> <5D23E5B41156B646B2E1A7C2BBA916F32243EF34F2@SRVFIHKIEXB01.pmgroup.local> Message-ID: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> 2010/1/7 Kustaa Nyholm > > >This is the biggest problem of the RXTX project - docs :(. > > Well, yes and no, rxtx is a JavaComm replacement so you can use Sun's > documentation: > > http://java.sun.com/products/javacomm/reference/api/index.html > > and it would seem rather pointless to re-create this documentation... > and the Sun example should also work I guess. > > I have spend many weeks over rxtx because of many more important configuration parameters than in original javaComm. Example: The biggest problem in my works was with close() between platforms... Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7). But configurations are DIFFERENT!!! And therefore I think that my example in thread (November) "RXTX close() problem solved" has a lot of IMPORTANT informations, which are not to obtain from original JavaComm.... So - in my opinion original docs are TRIVIAL and in fact have almost nothing to functions and possibilities of the RXTX. Using original documentation may be very frustrating... Another thing is that JavaComm is for Windows only.... For CE platform guru is Ivan from Moscow - informations only in mailing list. And Steffen from Germany has written some important notices as well. And many more peples, but here, not on Sun forums. Regards Mariusz Dec > br Kusti > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mariusz.dec at gmail.com Fri Jan 8 02:07:01 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:07:01 +0100 Subject: [Rxtx] Documentation In-Reply-To: <4B464B41.808@trustcommerce.com> References: <8FB6FECF10A14175A1DC3D3091D28432@morten> <4B464B41.808@trustcommerce.com> Message-ID: <73a89f361001080107m39643faayf619147dba0658d3@mail.gmail.com> > > > Try: > > http://rxtx.qbang.org/wiki/index.php/Using_RXTX > > and looking at the code examples provided there. > Examples are working but haven't nothing about important configuration stuffs... Only trivial - baud, parity etc. Close() of the port may be very problematic and needs some attention between platforms/drivers/hardware. Mariusz Dec > > Best, > Johnny > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAktGS0EACgkQnQTBLXttTeUrMACggPOsjYlU4wq9gBGLQmh6syfv > EMMAn15DvMCHqz0940IZPW1QOSlFOnhr > =G1CP > -----END PGP SIGNATURE----- > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Fri Jan 8 02:11:22 2010 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 8 Jan 2010 11:11:22 +0200 Subject: [Rxtx] Documentation In-Reply-To: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: > I?have spend many weeks over rxtx because of many more important configuration > parameters than in original javaComm. Could you enlighten us with examples or pointers to these issues? > ? > Example: > The biggest problem in my works was with close() between platforms... > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > But configurations are DIFFERENT!!! What do you mean by configurations being different? RXTX as Javacomm replacement should work the same regardless of the OS, if it does not, then it is a bug in the code, it is not a documentation issue (at least IMO the javadocs are not the place for this info and you originally asked for url to index.html, by which I presumed you meant the javadocs). > ? > And therefore I think that my example in thread (November) "RXTX close() > problem solved" has a lot of IMPORTANT informations, which?are not to obtain > from original JavaComm.... So you talking about examples/tutorial stuff? > So - in my opinion original docs are TRIVIAL and in fact have almost nothing > to functions and possibilities of the RXTX. They have always provided me with all the information I've ever needed to use RXTX, after all this is pretty simple stuff. > Using original documentation may > be very frustrating... > ? > Another thing is that JavaComm is for Windows only.... Yes but what has that got to do with documentation? From mariusz.dec at gmail.com Fri Jan 8 02:50:24 2010 From: mariusz.dec at gmail.com (Mariusz Dec) Date: Fri, 8 Jan 2010 10:50:24 +0100 Subject: [Rxtx] Documentation In-Reply-To: References: <73a89f361001080055m5906628bvc3806ae593dc07f9@mail.gmail.com> Message-ID: <73a89f361001080150g59af5cb7l54f82a0cda78404e@mail.gmail.com> 2010/1/8 Kustaa Nyholm > > > I have spend many weeks over rxtx because of many more important > configuration > > parameters than in original javaComm. > Could you enlighten us with examples or pointers to these issues? > Here is my example attached, commented inside: http://mailman.qbang.org/pipermail/rxtx/2009-November/5505540.html And here works of the Aaron: http://mailman.qbang.org/pipermail/rxtx/2009-December/5505567.html Problems solved and Aaron said: I don't know why, BUT WORKS!!! > > > > Example: > > The biggest problem in my works was with close() between platforms... > > Now it works VERY good on Linux, Macintosh and Windows (XP, Vista, W7) > > But configurations are DIFFERENT!!! > What do you mean by configurations being different? RXTX as Javacomm > replacement should work the same regardless of the OS, if it does not, > then it is a bug in the code, it is not a documentation issue (at least > IMO the javadocs are not the place for this info and you originally > asked for url to index.html, by which I presumed you meant the javadocs). > IN THEORY only. "Small" exception in javaComm - this is NOT a part of Java. This is Additional element for Java. Read carefully info on Sun site - there is written somewhere that it works in Win only. But on the site: http://java.sun.com/products/javacomm/ is written that it works only on Solrais and Linux. BTW: Everything on Sun's sites about serial comm looks to be a bit out of date... I have loaded comms from Sun this year, but binaries was about 10 yeas old - funny... Download it and try to find library comm.so for Linux - is it there? In my packege wasn't... In RXTX you have parameters which define timeouts and thresholds of the native driver. I do not know exactly what everything means, but I have found how to set it to work between platforms. Look in RXTX sources for "timeout" and "threshold' functions. > > > > And therefore I think that my example in thread (November) "RXTX close() > > problem solved" has a lot of IMPORTANT informations, which are not to > obtain > > from original JavaComm.... > So you talking about examples/tutorial stuff? > My example explains one of the important configuration stuff - native driver may return or not to Java if there is no data in kernel serial buffer. Therefore RXTX native part needs to know whether return instantly if kernel part (not RXTX) returns nothing. Sometimes "nothing" in the kernel buffer means: - kernel routine doesn't return (hangs until data will available) and thererfore we need RXTX timeout. sometimes: - kernel routine returns immediatelly when no data available but with data length = 0. > > So - in my opinion original docs are TRIVIAL and in fact have almost > nothing > > to functions and possibilities of the RXTX. > They have always provided me with all the information I've ever needed > to use RXTX, after all this is pretty simple stuff. > Pretty simple? let's try to close() port. > > Using original documentation may > > be very frustrating... > > > > Another thing is that JavaComm is for Windows only.... > Yes but what has that got to do with documentation? I don't know. I would like to help everybody to not waste time, which I have already wasted. Basing on my example and explanations you may use it succesfully (like me), but maybe beeing not perfect informed :) Regards Mariusz Dec > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Jan 8 19:43:36 2010 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Jan 2010 19:43:36 -0700 (MST) Subject: [Rxtx] Fix for the inconsistent version string In-Reply-To: References: Message-ID: On Thu, 7 Jan 2010, Ivan Maidanski wrote: > Hello! > > As I see, the version string in RXTXVersion.java has been recently changed. But the corresponding string in the native part is not changed yet. The attached patch fixes the problem (including the WinCE case). > Sure, I'll put it in. The src directory was not submitted as I was pondering some more patches. I'm going to try compiling some rxtx.org binaries this weekend. -- Trent Jarvi tjarvi at qbang.org From windymen1 at 163.com Wed Jan 13 23:08:39 2010 From: windymen1 at 163.com (ph) Date: Thu, 14 Jan 2010 14:08:39 +0800 Subject: [Rxtx] Porting to AIX Message-ID: <201001141408353318296@163.com> Hi, I'm new to rxtx,I am trying to get rxtx to build on AIX. This is output on building SerialImp.c. gmake ( \ \ cd powerpc-ibm-aix5.3.0.0; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ if [ "Serial" = "Serial" ]; then \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=compile gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -o \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo \ /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/fuserImp.lo; \ else \ /bin/sh /home/develop/ph/rxtx-2.1-7r2/libtool --mode=link gcc -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -release 2.1-7 -o librxtxSerial.la -rpath /usr/java5/jre/lib/ppc /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo; \ fi; \ ) gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'set_port_params': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:796: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1805: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1836: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_setDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:1890: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDSR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2170: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetRTS': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2236: warning: overflow in implicit constant conversion /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXPort_nativeStaticSetDTR': /home/develop/ph/rxtx-2.1-7r2/./src/SerialImp.c:2386: warning: overflow in implicit constant conversion gcc -I/home/develop/ph/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/java5/include -I/usr/java5/include/ -maix64 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -pthread -DDEBUG_VERBOSE -DDEBUG -c /home/develop/ph/rxtx-2.1-7r2/./src/fuserImp.c -DPIC -o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o rm -fr .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so .libs/librxtxSerial.a .libs/librxtxSerial.exp .libs/librxtxSerial.la .libs/librxtxSerial.lai generating symbol list for `librxtxSerial.la' /usr/bin/nm -B -BCpg /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/librxtxSerial.exp gcc -shared -o .libs/librxtxSerial-2.1-7.so /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/develop/ph/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/fuserImp.o -lc -maix64 -pthread -Wl,-bE:.libs/librxtxSerial.exp -Wl,-bnoentry ${wl}-berok ar cru .libs/librxtxSerial-2.1-7.a .libs/librxtxSerial-2.1-7.so (cd .libs && rm -f librxtxSerial.a && ln -s librxtxSerial-2.1-7.a librxtxSerial.a) creating librxtxSerial.la /home/develop/ph/rxtx-2.1-7r2/libtool: No space left on device (cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la) This is an error when I use it in listenSerialPort() . Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 open: locking worked for /dev/vty0 open: fd returned is 85 has_line_status_register_acess: Port does not support TIOCSERGETLSR initialise_event_info_struct: Port does not support events init_threads: start init_threads: creating drain_loop init_threads: get eis init_threads: set eis init_threads: stop drain_loop: looping entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 writeArray() entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 0 JVMJNCK074I JNI advice in ReleaseByteArrayElements: Buffer appears to be unmodified. Consider using JNI_ABORT instead of mode 0. entering check_tiocmget_changes ======================================= check_tiocmget_changes: ioctl(TIOCMGET) port_has_changed_fionread: change is 23768984 report_serial_events: sending DATA_AVAILABLE send_event: !eventloop_interupted send_event: jclazz send_event: calling Unhandled exception Type=Segmentation error vmState=0x00040000 J9Generic_Signal_Number=00000004 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032 Handler1=09001000A04DEE60 Handler2=09001000A04D61E0 R0=0000000054284AF0 R1=0000000154282040 R2=09001000A05FE1F0 R3=0000000054284AF0 R4=09000000016AEED0 R5=0000000000000066 R6=09001000A04CB228 R7=0000000000000003 R8=0000000000000010 R9=0000000054284AF0 R10=000000014AA7E7B8 R11=0000000000000000 R12=09001000A0057CD0 R13=000000015428F800 R14=0000000154302F70 R15=000000014AB5E400 R16=0000000000000007 R17=0000000000000000 R18=09001000A04E2FD8 R19=09001000A05FDCE0 R20=000000014AB52260 R21=0000000154302F98 R22=000000014AB5E4A0 R23=0000000000040000 R24=09001000A04D8378 R25=000000000000007E R26=000000011B35AA40 R27=000000011964C5E8 R28=0000000000000001 R29=000000014AB5E290 R30=0000000154284750 R31=0000000154282040 IAR=09000000016A9B44 LR=09000000016A9B34 MSR=A00000000000D032 CTR=0000000000000000 CR=4400084420000001 FPSCR=8202000000000000 XER=2000000182020000 FPR0 fff8000082020000 (f: 2181169152.000000, d: -NaNQ) FPR1 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR2 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR6 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR8 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR9 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR13 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00) FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00) Module=/home/develop/ph/MessageService/64_libs/librxtxSerial.so Module_base_address=09000000016A2000 Target=2_40_20090519_035743_BHdSMr (AIX 5.3) CPU=ppc64 (4 logical CPUs) (0x1f0000000 RAM) ----------- Stack Backtrace ----------- /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AA118 [0x016A2000 +0x00008118] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B594 [0x00942000 +0x00049594] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x00958898 [0x00942000 +0x00016898] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B920 [0x01630000 +0x0000B920] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9jnichk24.so:0x0163B85C [0x01630000 +0x0000B85C] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016ACACC [0x016A2000 +0x0000AACC] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB2F8 [0x016A2000 +0x000092F8] /home/develop/ph/MessageService/64_libs/librxtxSerial.so:0x016AB9A4 [0x016A2000 +0x000099A4] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0098B500 [0x00942000 +0x00049500] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E784 [0x00942000 +0x0000C784] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9prt24.so:0x009E0924 [0x009DD000 +0x00003924] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9vm24.so:0x0094E6A0 [0x00942000 +0x0000C6A0] /home/metarnop/java6/usr/java6_64/jre/lib/ppc64/default/libj9thr24.so:0x009CB5F0 [0x009C9000 +0x000025F0] /usr/lib/libpthreads.a:0x0081B4F0 [0x00818000 +0x000034F0] 0x00000000 --------------------------------------- JVMJNCK079I Advice detected in gnu/io/RXTXPort.writeArray([BIIZ)V writeArray: index->writing = 1JVMDUMP006I Processing dump event "gpf", detail "" - please wait. JVMDUMP032I JVM requested System dump using '/home/develop/ph/test/core.20100114.131559.196684.0001.dmp' in response to an event Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file. drain_loop: tcdrain bad fd ------------------ drain_loop ex